Skip to content

clocks: Cannot implement clock_nanosleep(CLOCK_REALTIME, ...) in C #857

@alexcrichton

Description

@alexcrichton

Currently WASIp{2,3} WITs for wasi:clocks only support subscribing to the monotonic clock, not the wall clock. This means that it's required for C programs to sleep with CLOCK_MONOTONIC instead of CLOCK_REALTIME. This issue was papered over with the historical WASIp1-to-WASIp2 adapter and never surfaced, but the libc implementation is slightly different in that it rejects sleeping with CLOCK_REALTIME since that's not actually supported. I'm not aware of a reason to specifically not support this, so I wanted to file an issue to eventually add the same-style subscribe* functions to the wasi:clocks/wall-clock interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-clocksProposal: wasi-clocks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions