mirror of
https://github.com/romychs/Ocean-240.2-Emulator.git
synced 2026-11-27 08:13:40 +03:00
Redo main cycle
This commit is contained in:
1 parent
c1616dfbd6
commit
a74841b048
11 files changed
+434
-139
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package nanotime
|
||||
|
||||
import (
|
||||
"time"
|
||||
_ "unsafe" // required to use //go:linkname
|
||||
)
|
||||
|
||||
//go:noescape
|
||||
//go:linkname nanotime runtime.nanotime
|
||||
func nanotime() int64
|
||||
|
||||
func Now() uint64 {
|
||||
return uint64(nanotime())
|
||||
}
|
||||
|
||||
func Since(t uint64) time.Duration {
|
||||
return time.Duration(Now() - t)
|
||||
}
|
||||
Reference in new issue
Block a user