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


145
146
147
# File 'lib/assert/cli.rb', line 145

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