Class: UnionStationHooks::TimePoint
- Inherits:
-
Object
- Object
- UnionStationHooks::TimePoint
- Defined in:
- lib/union_station_hooks_core/time_point.rb
Overview
See now for more information.
Instance Attribute Summary collapse
- #stime ⇒ Object readonly private
- #time ⇒ Object readonly private
- #utime ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(time, utime, stime) ⇒ TimePoint
constructor
private
A new instance of TimePoint.
- #to_i ⇒ Object private
- #usec ⇒ Object private
- #usec_timestamp ⇒ Object private
Constructor Details
#initialize(time, utime, stime) ⇒ TimePoint
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TimePoint.
32 33 34 35 36 |
# File 'lib/union_station_hooks_core/time_point.rb', line 32 def initialize(time, utime, stime) @time = time @utime = utime @stime = stime end |
Instance Attribute Details
#stime ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 |
# File 'lib/union_station_hooks_core/time_point.rb', line 29 def stime @stime end |
#time ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 |
# File 'lib/union_station_hooks_core/time_point.rb', line 29 def time @time end |
#utime ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 |
# File 'lib/union_station_hooks_core/time_point.rb', line 29 def utime @utime end |
Instance Method Details
#to_i ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 |
# File 'lib/union_station_hooks_core/time_point.rb', line 49 def to_i @time.to_i end |
#usec ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/union_station_hooks_core/time_point.rb', line 44 def usec @time.usec end |
#usec_timestamp ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 |
# File 'lib/union_station_hooks_core/time_point.rb', line 39 def @time.to_i * 1_000_000 + @time.usec end |