Prelude API
    Preparing search index...

    Module @prelude/remote-clock

    Remote clock module

    Usage

    npm i -E @prelude/remote-clock
    
    import * as RemoteClock from '@prelude/remote-clock'
    
    const clock = RemoteClock.of()
    // ...merge measurements with RemoteClock.record(clock, before, remote, after)
    for await (const now of RemoteClock.midSeconds(clock, { signal })) {
    console.log(new Date(now).toISOString()) // once per remote second, mid-second
    }

    midSeconds(clock, { signal }) and midSecondsInterval(clock, callback, { signal }) stop on abort: the pending timer is cleared and the generator throws signal.reason; midSecondsInterval also returns a stop function.

    License

    This package is dedicated to the public domain under CC0 1.0.

    RemoteClock
    t
    date
    duration
    midSeconds
    midSecondsInterval
    nextMidSecondOffset
    now
    of
    offset
    record