Skip to content

Nanoseconds() gives wrong value on Windows. #1092

@gopherbot

Description

@gopherbot

by mizardx:

What steps will reproduce the problem?
1. Print time.Seconds()
2. Print time.Nanoseconds() / 1e9
3. Compare the results

What is the expected output?
They should be identical.

What do you see instead?
There is a huge difference, several seconds.

What is your $GOOS?  $GOARCH?
GOOS = windows
GOARCH = 386

Which revision are you using?  (hg identify)
release.2010-08-11

Please provide any additional information below.
The problem originates from the Gettimeofday() function in syscall/syscall_windows.go
(line 396).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions