Module: Assert::RoundedMillisecondTime

Defined in:
lib/assert/cli.rb

Constant Summary collapse

ROUND_PRECISION =
3
ROUND_MODIFIER =
10 ** ROUND_PRECISION

Class Method Summary collapse

Class Method Details

.new(time_in_seconds) ⇒ Object



87
88
89
# File 'lib/assert/cli.rb', line 87

def self.new(time_in_seconds)
  (time_in_seconds * 1000 * ROUND_MODIFIER).to_i / ROUND_MODIFIER.to_f
end