mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
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:
committed by
Ron Evans
parent
abc373dc73
commit
41e501aaf4
@@ -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) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user