diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-04 15:01:11 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-04 15:01:11 +0000 |
commit | 33e337e34d69a2e298be8b6c109b601c2986339b (patch) | |
tree | df1037674f2c69011469485414315a50607f9d08 /libgo/go/time/time.go | |
parent | 1eae36f08cddc7779cd0ed75b359c9a54f67adff (diff) | |
download | gcc-33e337e34d69a2e298be8b6c109b601c2986339b.zip gcc-33e337e34d69a2e298be8b6c109b601c2986339b.tar.gz gcc-33e337e34d69a2e298be8b6c109b601c2986339b.tar.bz2 |
libgo: Update to Go 1.0.1 release.
From-SVN: r187163
Diffstat (limited to 'libgo/go/time/time.go')
-rw-r--r-- | libgo/go/time/time.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/time/time.go b/libgo/go/time/time.go index 473bc2a..2461dac 100644 --- a/libgo/go/time/time.go +++ b/libgo/go/time/time.go @@ -403,7 +403,7 @@ const ( Hour = 60 * Minute ) -// Duration returns a string representing the duration in the form "72h3m0.5s". +// String returns a string representing the duration in the form "72h3m0.5s". // Leading zero units are omitted. As a special case, durations less than one // second format use a smaller unit (milli-, micro-, or nanoseconds) to ensure // that the leading digit is non-zero. The zero duration formats as 0, @@ -763,7 +763,9 @@ func (t Time) Unix() int64 { } // UnixNano returns t as a Unix time, the number of nanoseconds elapsed -// since January 1, 1970 UTC. +// since January 1, 1970 UTC. The result is undefined if the Unix time +// in nanoseconds cannot be represented by an int64. Note that this +// means the result of calling UnixNano on the zero Time is undefined. func (t Time) UnixNano() int64 { return (t.sec+internalToUnix)*1e9 + int64(t.nsec) } |