Skip to content

usleep is broken and should not be used #12689

Closed
@thestinger

Description

@thestinger

It was actually removed from POSIX since it can't be used correctly. There's no way of sleeping until the time is elapsed as it doesn't report the elapsed time on EINTR. Instead, clock_nanosleep or nanosleep should be used.

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