Module: NetworkExecutive::TimeCalculations

Defined in:
lib/network_executive/time_calculations.rb

Instance Method Summary collapse

Instance Method Details

#floor(nearest) ⇒ Object

Rounds the specific time to the nearest interval



5
6
7
# File 'lib/network_executive/time_calculations.rb', line 5

def floor( nearest )
  Time.at( (self.to_f / nearest.to_i).floor * nearest.to_i )
end