Fix wall-time of the SpawnResult in WorkerSpawnRunner
Previously we would do `currentTime - startTime`, but `Duration.between`
expects the first parameter to be the start-time and will return
negative `Duration` otherwise.
RELNOTES: Fix wall-time of the SpawnResult in WorkerSpawnRunner
@@ -195,7 +195,7 @@ final class WorkerSpawnRunner implements SpawnRunner {
Instant startTime = Instant.now();
WorkResponse response =
execInWorker(spawn, key, context, inputFiles, outputs, flagFiles, inputFileCache);
- Duration wallTime = Duration.between(Instant.now(), startTime);
+ Duration wallTime = Duration.between(startTime, Instant.now());
FileOutErr outErr = context.getFileOutErr();
response.getOutputBytes().writeTo(outErr.getErrorStream());
