Module: Airbrake::MonotonicTime Private
- Defined in:
- lib/airbrake-ruby/monotonic_time.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
MonotonicTime is a helper for getting monotonic time suitable for performance measurements. It guarantees that the time is strictly linearly increasing (unlike realtime).
Class Method Summary collapse
-
.time_in_ms ⇒ Integer
private
Current monotonic time in milliseconds.
-
.time_in_s ⇒ Integer
private
Current monotonic time in seconds.
Class Method Details
.time_in_ms ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns current monotonic time in milliseconds.
15 16 17 |
# File 'lib/airbrake-ruby/monotonic_time.rb', line 15 def time_in_ms time_in_nanoseconds / (10.0**6) end |
.time_in_s ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns current monotonic time in seconds.
20 21 22 |
# File 'lib/airbrake-ruby/monotonic_time.rb', line 20 def time_in_s time_in_nanoseconds / (10.0**9) end |