Module: Trashed::Instruments::Timepiece
- Defined in:
- lib/trashed/instruments/stopwatch.rb
Class Method Summary collapse
-
.cpu ⇒ Object
ruby-prof installed.
- .wall ⇒ Object
Class Method Details
.cpu ⇒ Object
ruby-prof installed
48 49 50 |
# File 'lib/trashed/instruments/stopwatch.rb', line 48 def self.cpu Process.clock_gettime Process::CLOCK_PROCESS_CPUTIME_ID, :float_millisecond end |
.wall ⇒ Object
36 37 38 |
# File 'lib/trashed/instruments/stopwatch.rb', line 36 def self.wall ::Time.now.to_f * 1000 end |