1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 17:27:23 -04:00
OpenDiablo2/d2common/timeutils.go
Maxime Lavigne (malavv) 973e969002
Working on d2input.go for #487 (#514)
d2input/ is now clear of lint.
2020-07-01 14:03:40 -04:00

10 lines
266 B
Go

package d2common
import "time"
// Now returns how many seconds have elapsed since Unix time (January 1, 1970 UTC)
func Now() float64 {
// Unix time in nanoseconds divided by how many nanoseconds in a second
return float64(time.Now().UnixNano()) / 1000000000.0
}