Class: Barrage::Generators::Msec
- Inherits:
-
Base
- Object
- Base
- Barrage::Generators::Msec
show all
- Defined in:
- lib/barrage/generators/msec.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #length
Instance Method Details
#generate ⇒ Object
Also known as:
current
8
9
10
|
# File 'lib/barrage/generators/msec.rb', line 8
def generate
((Time.now.to_f * 1000).round - start_at) & (2 ** length - 1)
end
|
#start_at ⇒ Object
14
15
16
|
# File 'lib/barrage/generators/msec.rb', line 14
def start_at
options["start_at"]
end
|