Class: Lhm::Timestamp
- Inherits:
-
Object
- Object
- Lhm::Timestamp
- Defined in:
- lib/lhm/timestamp.rb
Instance Method Summary collapse
-
#initialize(time) ⇒ Timestamp
constructor
A new instance of Timestamp.
- #to_s ⇒ Object
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_s ⇒ Object
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 |