You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/logging/logfile_bsd.go

17 lines
343 B

//go:build darwin || freebsd || netbsd || openbsd
// +build darwin freebsd netbsd openbsd
package logging
import (
"os"
"syscall"
"time"
)
func (l *LogFile) createTime(stat os.FileInfo) time.Time {
stat_t := stat.Sys().(*syscall.Stat_t)
createTime := stat_t.Ctimespec
return time.Unix(int64(createTime.Sec), int64(createTime.Nsec))
}