diff options
author | nea <romangraef@gmail.com> | 2022-08-26 15:12:25 +0200 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-08-26 15:12:25 +0200 |
commit | 36374a03516517a89bbb74ce58053ac5ca44f752 (patch) | |
tree | 8d377d65691536cbae43a6ebd629c07146314ee3 /src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt | |
parent | 176e37844c17eaabb5c9da0f9c23237df9c0b5a8 (diff) | |
download | neamoe-36374a03516517a89bbb74ce58053ac5ca44f752.tar.gz neamoe-36374a03516517a89bbb74ce58053ac5ca44f752.tar.bz2 neamoe-36374a03516517a89bbb74ce58053ac5ca44f752.zip |
default commands
Diffstat (limited to 'src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt')
-rw-r--r-- | src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt b/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt index bd72421..b3a7bd8 100644 --- a/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt +++ b/src/jsMain/kotlin/moe/nea89/website/ShellExecutionContext.kt @@ -13,6 +13,7 @@ class ShellExecutionContext( ) { suspend fun wait(duration: Duration) { + if (!duration.isPositive()) return suspendCancellableCoroutine<Unit> { window.setTimeout({ it.resume(Unit) |