Helper module to calculate integer time values since the 1970 epoch.
Specifically, the time that has passed since 00:00:00 UTC Jan 1 1970.
Methods
Instance Public methods
milliseconds_since_epoch() Link
Returns approximately the number of milliseconds since the 1970 epoch. A random amount of milliseconds between -5000 and 5000 is added so that primary key ids calculated with this should be unique.
Source: show
# File lib/anki_record/helpers/time_helper.rb, line 15 def milliseconds_since_epoch DateTime.now.strftime("%Q").to_i + rand(-5000..5000) end