Skip to content

Use CLOCK_BOOTTIME source when sleeping #64

@wavexx

Description

@wavexx

When sleeping between timers, the current code uses nanosleep, which uses CLOCK_MONOTONIC as a time source.

CLOCK_MONOTONIC doesn't advance when the system is suspended, which prevents xidlelock to trigger correctly right after the system has woken up from an extended sleep.

xidlelock should probably use clock_nanosleep with CLOCK_BOOTTIME as a time source, which correctly counts suspended time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions