From 2f1147f224d94f17ae97123db972db8f9b48e94b Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Tue, 27 Dec 2022 12:24:29 +0100 Subject: [PATCH] DurationUnit is not a typealias of TimeUnit anymore, use inWholeMilliseconds instead See https://kotlinlang.org/docs/whatsnew16.html#stable-duration-api --- .../main/kotlin/org/jetbrains/kotlin/executors/HostExecutor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/executors/HostExecutor.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/executors/HostExecutor.kt index 095b22b450b..f46d3d0b09f 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/executors/HostExecutor.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/executors/HostExecutor.kt @@ -60,7 +60,7 @@ class HostExecutor : Executor { process.errorStream.close() }) - if (!process.waitFor(request.timeout.toLong(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS)) { + if (!process.waitFor(request.timeout.inWholeMilliseconds, TimeUnit.MILLISECONDS)) { logger.warning("Timeout running $commandLine") // Cancel every stream, no need to wait for them. jobs.forEach {