equal
deleted
inserted
replaced
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 |