Method: Hitimes.clock_name
- Defined in:
- lib/hitimes/instant.rb
.clock_name ⇒ Object
Internal: The human readable clock name of the CLOCK_ID as a string
Returns the clock name as a String
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/hitimes/instant.rb', line 29 def clock_name case CLOCK_ID when Symbol CLOCK_ID.to_s else const = Process.constants.grep(/CLOCK/).find do |id| Process.const_get(id) == CLOCK_ID end "Process::#{const}" end end |