class Ark::Timer

A stopwatch-like timer

Constants

Conf

Configuration details for Ark::Timer. Settings:

:round

Number of places to round the returned time to

Public Class Methods

reset() click to toggle source

Reset the timer start time to now

# File lib/ark/utility.rb, line 28
def self.reset()
  @@start = Time.now
end
time() click to toggle source

Return the time in seconds from the last call to reset, or from the beginning of program execution

# File lib/ark/utility.rb, line 34
def self.time()
  t = Time.now - @@start
  t.round(Conf[:round]).to_s.ljust(5,'0')
end