Skip to content
FutureBlitz

    Install

    Import std.time.clock

    Measure

    std.time.clock

    function

    Public Function Measure(work: Func()): Duration

    How long the work takes, on the monotonic clock.

    Examples

    Local nap = Function()
        Sleep(2.Milliseconds)
    End Function
    Expect(Measure(nap) >= 2.Milliseconds)

    std/time/clock.fb, line 171

    Report an issue with this page or with FutureBlitz on GitHub.