mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
9c1b760016
commit
bbcee77b02
@ -21,8 +21,10 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var initTime = time.Now()
|
||||
|
||||
func now() int64 {
|
||||
// time.Now() is monotonic:
|
||||
// time.Since() returns monotonic timer difference (#875):
|
||||
// https://golang.org/pkg/time/#hdr-Monotonic_Clocks
|
||||
return time.Now().UnixNano()
|
||||
return int64(time.Since(initTime))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user