Scoop API

scoop:scoop.platform:0.1.0

scoop.platform.time

API

  • struct MonotonicInstant

    A point on the system monotonic clock, expressed as seconds plus a signed nanosecond adjustment. Clock reads use a fraction in 0..999999999. Arithmetic and comparison normalize other adjustments and throw ArithmeticException if the resulting seconds are outside Long range.

  • object MonotonicTimeSource

    A monotonic source for elapsed-time measurement, independent of wall-clock adjustments.

  • object SystemClock

    The operating-system wall clock used for civil timestamps; it can change when system time is adjusted.

  • struct TimedValue

    A returned value paired with the duration measured while producing it.

  • function elapsedNow

    Measures elapsed monotonic time since this mark.

  • function measureTime

    Runs the block and measures its elapsed duration using the selected source.

  • function measureTimedValue

    Runs the block and returns both its result and measured elapsed duration.

  • function sleep

    Blocks the current native thread for a nonnegative duration.