1
0
Fork 0
telegraf/plugins/inputs/postfix/stat_ctimespec.go
Daniel Baumann 4978089aab
Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-24 07:26:29 +02:00

16 lines
234 B
Go

//go:build darwin || freebsd
package postfix
import (
"syscall"
"time"
)
func statCTime(sys interface{}) time.Time {
stat, ok := sys.(*syscall.Stat_t)
if !ok {
return time.Time{}
}
return time.Unix(stat.Ctimespec.Unix())
}