A sensible interface to monotonic time in Ruby
29-Sep-2023 583
Monotime offers a Duration type for describing spans of time, and an Instant type for describing points in time. Both operate at nanosecond resolution to the limits of whatever your Ruby implementation supports.For example, to measure an elapsed time, either create an Instant to mark the start point, perform the action and then ask for the Duration that has elapsed since:.
A sensible interface to monotonic time in Ruby #ruby #rubydeveloper #rubyonrails #sensible #interface #monotonic https://rubyonrails.ba/link/a-sensible-interface-to-monotonic-time-in-ruby