mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-12 06:11:03 -04:00
17 lines
281 B
Go
17 lines
281 B
Go
![]() |
// +build !linux
|
||
|
|
||
|
package archive // import "github.com/docker/docker/pkg/archive"
|
||
|
|
||
|
import (
|
||
|
"syscall"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func timeToTimespec(time time.Time) (ts syscall.Timespec) {
|
||
|
nsec := int64(0)
|
||
|
if !time.IsZero() {
|
||
|
nsec = time.UnixNano()
|
||
|
}
|
||
|
return syscall.NsecToTimespec(nsec)
|
||
|
}
|