runtime: move timeUnit to a single place

The timeUnit is now the same type everywhere. Move it to a single place
and add some documentation to it.
This commit is contained in:
Ayke van Laethem
2025-04-12 12:54:06 +02:00
committed by Ron Evans
parent abc373dc73
commit 41e501aaf4
27 changed files with 13 additions and 58 deletions
-5
View File
@@ -5,8 +5,6 @@ package runtime
// TODO: this is essentially reactor mode wasm. So we might want to support
// -buildmode=c-shared (and default to it).
type timeUnit int64
// libc constructors
//
//export __wasm_call_ctors
@@ -24,9 +22,6 @@ func nanosecondsToTicks(ns int64) timeUnit {
return timeUnit(ns)
}
// with the wasm32-unknown-unknown target there is no way to determine any `precision`
const timePrecisionNanoseconds = 1000
func sleepTicks(d timeUnit) {
}