Skip to content

thermalctld is not using monotonic time for determining when to updating sensors #828

Description

@saiarcot895

The current version of thermalctld is using the current wall-clock time to determine if it should update temperature sensors or not. If there is a time jump for whatever reason, this is going to yield unexpected results. In the case of jumping forward, sensors may get updated sooner than expected (the worst case here might be a transient high CPU usage). In the case of jumping backward, sensors might not get updated for a long time until the wall-clock time catches up to the previous update.

Code related to when something happens or how long it took to do something should be using the monotonic time, unless there's a good reason to use the wall-clock time (such as for displaying times to a user).

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