Class: UnionStationHooks::TimePoint

Inherits:
Object
  • Object
show all
Defined in:
lib/union_station_hooks_core/time_point.rb

Overview

See now for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#stimeObject (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

#timeObject (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

#utimeObject (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_iObject

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

#usecObject

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_timestampObject

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 usec_timestamp
  @time.to_i * 1_000_000 + @time.usec
end