Skip to content

Library can measure negative times #9

@kevinburke

Description

@kevinburke

Occasionally the duration reported by calling a := time.Now(); b := time.Now(); c := b.Since(a) can be negative, since Go does not use a monotonic clock source for time.Now() calls. This affected production code after the leap second yesterday. This is being discussed at e.g. golang/go#12914 but it might be good to consider switching to something like https://godoc.org/github.com/davecheney/junk/clock in the meantime.

I'm still researching this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions