Skip to content

Calculating durations should use a monotonic clock instead of system_clock #100

@jwheeler91

Description

@jwheeler91

Durations should not use the system_clock as this can change, resulting in "incorrect" durations (e.g. a user changing the system clock back an hour while an application is running in the background could result in a negative duration).

Instead, durations should be calculated using a monotonic clock (e.g. steady_clock)

However: timestamps need to continue to use system_clock as they need a known epoch time (steady_clock won't provide a known epoch - it ends up as time since the clock started)

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