Class: Lhm::Timestamp

Inherits:
Object
  • Object
show all
Defined in:
lib/lhm/timestamp.rb

Instance Method Summary collapse

Constructor Details

#initialize(time) ⇒ Timestamp

Returns a new instance of Timestamp.



3
4
5
# File 'lib/lhm/timestamp.rb', line 3

def initialize(time)
  @time = time
end

Instance Method Details

#to_sObject



7
8
9
# File 'lib/lhm/timestamp.rb', line 7

def to_s
  @time.strftime "%Y_%m_%d_%H_%M_%S_#{ '%03d' % (@time.usec / 1000) }"
end