Skip to content

Consider whether ContinousClock is the "correct" default clock #9

Open
@gregcotten

Description

@gregcotten

Task.sleep(nanoseconds:) is used to sleep when calling withThrowingTimeout(seconds:). AFAICT Task.sleep(nanoseconds:) pauses on system sleep.

The withThrowingTimeout(after:) function uses a ContinousClock which is "A clock that measures time that always increments and does not stop incrementing while the system is asleep."

I think the withThrowingTimeout() functions that don't require a Clock parameter should all have the same behavior. Should ContinousClock change to SuspendingClock?

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