This commit is contained in:
Samir Patel 2021-09-29 15:57:31 -05:00
parent feb8997ca8
commit 5d070b47bb

View file

@ -4,11 +4,10 @@ package main
import (
"syscall"
"time"
)
func CTimeNano(stat *syscall.Stat_t) int64 {
NANOS := int64(1e9) // number of nanosecs in 1 sec
ts := stat.Ctimespec
time.Unix(int64(ts.Sec), int64(ts.Nsec))
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
return ts.Sec*NANOS + ts.Nsec
}