Module: Rhales::Utils
- Included in:
- LoggingHelpers
- Defined in:
- lib/rhales/utils.rb,
lib/rhales/utils/logging_helpers.rb
Defined Under Namespace
Modules: LoggingHelpers
Instance Method Summary collapse
-
#now ⇒ Time
Current time in UTC.
-
#now_in_μs ⇒ Integer
(also: #now_in_microseconds)
Returns the current time in microseconds.
Instance Method Details
#now ⇒ Time
Returns Current time in UTC.
8 9 10 |
# File 'lib/rhales/utils.rb', line 8 def now Time.now.utc end |
#now_in_μs ⇒ Integer Also known as: now_in_microseconds
Returns the current time in microseconds. This is used to measure the duration of Database commands.
Alias: now_in_microseconds
18 19 20 |
# File 'lib/rhales/utils.rb', line 18 def now_in_μs Process.clock_gettime(Process::CLOCK_MONOTONIC, :microsecond) end |