This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/66574] New: Time is provided in millisecond precision instead of nanoseconds as described in go documentation
- From: "boger at us dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 17 Jun 2015 15:42:50 +0000
- Subject: [Bug go/66574] New: Time is provided in millisecond precision instead of nanoseconds as described in go documentation
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66574
Bug ID: 66574
Summary: Time is provided in millisecond precision instead of
nanoseconds as described in go documentation
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: boger at us dot ibm.com
CC: cmang at google dot com
Target Milestone: ---
Target: ppc64le, ppc64, x86_64
Created attachment 35794
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35794&action=edit
testcase demonstrating microsecond precision of time.Now()
According to http://golang.org/pkg/time/#Time
A Time represents an instant in time with nanosecond precision.
The precision provided by gccgo when calling time.Now() is in microseconds, not
nanoseconds, since it invokes gettimeofday to retrieve the time. If
clock_gettime was called instead, that would provide nanosecond precision.
A testcase is attached.
This is a mirror of an issue that was reported to the golang issue tracker:
https://github.com/golang/go/issues/11222.