YTSFlix_Go/vendor/github.com/anacrolix/missinggo/atime_atimespec.go

15 lines
236 B
Go
Raw Normal View History

2018-11-04 14:58:15 +00:00
// +build darwin freebsd netbsd
package missinggo
import (
"os"
"syscall"
"time"
)
func fileInfoAccessTime(fi os.FileInfo) time.Time {
ts := fi.Sys().(*syscall.Stat_t).Atimespec
return time.Unix(int64(ts.Sec), int64(ts.Nsec))
}