1
//go:build netbsd || freebsd || darwin
2
3
package http
4
5
import (
6
"fmt"
7
"syscall"
8
)
9
10
func statAtime(sys any) (int64, error) {
11
x, ok := sys.(*syscall.Stat_t)
12
if !ok {
13
return 0, fmt.Errorf("stat sys is a %T, expected *syscall.Stat_t", sys)
14
}
15
return int64(x.Atimespec.Sec)*1000*1000*1000 + int64(x.Atimespec.Nsec), nil
16
}
17