module Cucumber::Messages::Helpers::TimeConversion
Constants
- NANOSECONDS_PER_SECOND
Public Instance Methods
Source
# File lib/cucumber/messages/helpers/time_conversion.rb, line 9 def time_to_timestamp(time) Cucumber::Messages::Timestamp.new(seconds: time.to_i, nanos: time.nsec) end
Source
# File lib/cucumber/messages/helpers/time_conversion.rb, line 13 def timestamp_to_time(timestamp) Time.at(timestamp.seconds, timestamp.nanos, :nanosecond) end