status-go/vendor/github.com/anacrolix/missinggo/v2/atime_atim.go

15 lines
241 B
Go

// +build linux dragonfly openbsd solaris
package missinggo
import (
"os"
"syscall"
"time"
)
func fileInfoAccessTime(fi os.FileInfo) time.Time {
ts := fi.Sys().(*syscall.Stat_t).Atim
return time.Unix(int64(ts.Sec), int64(ts.Nsec))
}