Skip to content

Commit

Permalink
fix: Actually wait the seconds requested
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Sep 16, 2024
1 parent eb90b8d commit 5140ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class HybridTestObjectKotlin: HybridTestObjectSwiftKotlinSpec() {
}

override fun wait(seconds: Double): Promise<Unit> {
return Promise.async { delay(5000) }
return Promise.async { delay(seconds.toLong() * 1000) }
}

override fun callCallback(callback: () -> Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class HybridTestObjectSwift : HybridTestObjectSwiftKotlinSpec {

func wait(seconds: Double) throws -> Promise<Void> {
return Promise.async {
try await Task.sleep(nanoseconds: 5 * 1_000_000)
try await Task.sleep(nanoseconds: UInt64(seconds) * 1_000_000_000)
}
}

Expand Down

0 comments on commit 5140ac8

Please sign in to comment.