LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package time | 5 package time |
6 | 6 |
7 // Seconds reports the number of seconds since the Unix epoch, | 7 // Seconds reports the number of seconds since the Unix epoch, |
8 // January 1, 1970 00:00:00 UTC. | 8 // January 1, 1970 00:00:00 UTC. |
9 func Seconds() int64 { | 9 func Seconds() int64 { |
10 return Nanoseconds() / 1e9 | 10 return Nanoseconds() / 1e9 |
11 } | 11 } |
12 | 12 |
13 // Nanoseconds is implemented by package runtime. | 13 // Nanoseconds is implemented by package runtime. |
14 | 14 |
15 // Nanoseconds reports the number of nanoseconds since the Unix epoch, | 15 // Nanoseconds reports the number of nanoseconds since the Unix epoch, |
16 // January 1, 1970 00:00:00 UTC. | 16 // January 1, 1970 00:00:00 UTC. |
17 func Nanoseconds() int64 | 17 func Nanoseconds() int64 |
18 | 18 |
19 // Sleep pauses the current goroutine for at least ns nanoseconds. | 19 // Sleep pauses the current goroutine for at least ns nanoseconds. |
20 // Higher resolution sleeping may be provided by syscall.Nanosleep | |
21 // on some operating systems. | |
22 func Sleep(ns int64) | 20 func Sleep(ns int64) |
LEFT | RIGHT |