Module: Snapcat::Timestamp

Extended by:
Timestamp
Included in:
Timestamp
Defined in:
lib/snapcat/timestamp.rb

Instance Method Summary collapse

Instance Method Details

#floatObject



5
6
7
# File 'lib/snapcat/timestamp.rb', line 5

def float
  Time.now.to_f
end

#macroObject



9
10
11
# File 'lib/snapcat/timestamp.rb', line 9

def macro
  float.floor
end

#microObject



13
14
15
# File 'lib/snapcat/timestamp.rb', line 13

def micro
  (float * 1000).floor
end