summaryrefslogtreecommitdiff
path: root/app/stat-darwin.go
blob: f3e05bcf5a94cb4440766ddfe5253c38a9ef4ad9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//go:build darwin
// +build darwin

package app

import (
	"syscall"
	"time"
)

// macOS names the ctime field Ctimespec rather than Ctim, so it needs its own
// variant to let the project build and test on a Mac (deploys are Linux).
func statTime(stat *syscall.Stat_t) int64 {
	return time.Unix(stat.Ctimespec.Unix()).UnixMilli()
}