1//go:build netbsd || freebsd || darwin
2
3package http
4
5import (
6 "fmt"
7 "syscall"
8)
9
10func 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