Class: Cucumber::Core::Test::Timer
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/timer.rb
Defined Under Namespace
Modules: MonotonicTime
Instance Method Summary collapse
Instance Method Details
#duration ⇒ Object
13 14 15 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/timer.rb', line 13 def duration Result::Duration.new(nsec) end |
#nsec ⇒ Object
17 18 19 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/timer.rb', line 17 def nsec time_in_nanoseconds - @start_time end |
#sec ⇒ Object
21 22 23 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/timer.rb', line 21 def sec nsec / (10**9.0) end |
#start ⇒ Object
8 9 10 11 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/test/timer.rb', line 8 def start @start_time = time_in_nanoseconds self end |