4.21. kink/STOPWATCH

Provides stopwatch fun, which yields elapsed time.

4.21.1. STOPWATCH.start

`start` makes a stopwatch fun.

The stopwatch fun takes no argument, then returns the elapsed time from the invocation of `start` in seconds, with precision of nanoseconds.

The result of the stopwatch fun is non-negative num with scale=9.

Example (the output varies for each execution):

:STOPWATCH.require_from('kink/')
:THREAD.require_from('kink/thread/')

:elapsed_seconds <- STOPWATCH.start

THREAD.sleep(1)
stdout.print_line(elapsed_seconds.repr) # => 1.001089645

THREAD.sleep(2)
stdout.print_line(elapsed_seconds.repr) # => 3.004145317