vendor/golang.org/x/sys/unix/timestruct.go
changeset 272 e9ffa471eeb3
parent 256 6d9efbef00a9
child 275 4a25a40d0c59
equal deleted inserted replaced
271:c8b8b7cc8896 272:e9ffa471eeb3
     7 
     7 
     8 package unix
     8 package unix
     9 
     9 
    10 import "time"
    10 import "time"
    11 
    11 
    12 // TimespecToNSec returns the time stored in ts as nanoseconds.
    12 // TimespecToNsec returns the time stored in ts as nanoseconds.
    13 func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
    13 func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
    14 
    14 
    15 // NsecToTimespec converts a number of nanoseconds into a Timespec.
    15 // NsecToTimespec converts a number of nanoseconds into a Timespec.
    16 func NsecToTimespec(nsec int64) Timespec {
    16 func NsecToTimespec(nsec int64) Timespec {
    17 	sec := nsec / 1e9
    17 	sec := nsec / 1e9