Registry / utility / absolute-time

absolute-time

JSON →
library1.0.0rbrubygemsunverified

This gem provides a monotonically increasing timer to permit safe measurement of time intervals.

gem install absolute_time
INSTALL
IMPORT
SIG · ABSOLUTE-TIME
A
absolute-time
utilityrubyv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AbsoluteTime
require 'absolute_time'

Measure a time interval using a monotonic clock.

require 'absolute_time' t1 = AbsoluteTime.now sleep(1) t2 = AbsoluteTime.now puts "Elapsed: #{t2 - t1} seconds"
Debug
Known issues
gotchaThe time values returned by AbsoluteTime cannot be interpreted as real time clock values; they are only useful for comparison.
fix
Do not use AbsoluteTime for absolute timestamps; use Time.now for that.
affects: >= 1.0.0
Upgrade
Version history
1.0.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
1
Resources
absolute-time — gem install absolute-time · libregistry