Elapsed time



examples/time/elapsed_time.cr
t0 = Time.monotonic
sleep 1
t1 = Time.monotonic

elapsed = t1 - t0
puts elapsed
puts elapsed.seconds
puts elapsed.total_seconds
puts elapsed.total_milliseconds
puts elapsed.microseconds
puts elapsed.total_microseconds

00:00:01.004479308
1
1.004479308
1004.479308
4479
1004479.308