Class: Cucumber::Core::Test::Timer
- Inherits:
-
Object
- Object
- Cucumber::Core::Test::Timer
- Defined in:
- lib/cucumber/core/test/timer.rb
Instance Method Summary collapse
Instance Method Details
#duration ⇒ Object
12 13 14 |
# File 'lib/cucumber/core/test/timer.rb', line 12 def duration Result::Duration.new(nsec) end |
#nsec ⇒ Object
16 17 18 |
# File 'lib/cucumber/core/test/timer.rb', line 16 def nsec time_in_nanoseconds - @start_time end |
#sec ⇒ Object
20 21 22 |
# File 'lib/cucumber/core/test/timer.rb', line 20 def sec nsec / 10 ** 9.0 end |
#start ⇒ Object
7 8 9 10 |
# File 'lib/cucumber/core/test/timer.rb', line 7 def start @start_time = time_in_nanoseconds self end |