class Stopwatch::Timer
- Stopwatch::Timer
- Reference
- Object
Overview
Timer
Object that behaves as a stop watch timer.
Defined in:
stopwatch.crConstructors
Instance Method Summary
-
#average : Float64
Average of times.
-
#h : String
Human display of total time elapsed in hours, minutes, and seconds.
-
#ha : String
Human representation of average seconds per
#mark
. -
#last : Float64 | Nil
Last time
#mark
ed. -
#mark : Time | Array(Float64)
Start & Mark time with this
#mark
method. -
#time? : Bool
Boolean check for any times
#mark
ed. -
#times : Array(Float64)
A collection of times
#mark
ed. -
#total : Int32 | Float64
Total time accumulated.
Constructor Detail
Instance Method Detail
Average of times. If #time?
if false this will raise an error.
@return [Float64,Error]
Human display of total time elapsed in hours, minutes, and seconds.
@return [String] String of hh:mm:ss
Human representation of average seconds per #mark
.
@return [String] String representation of average or empty for none.
Start & Mark time with this #mark
method.
@return [Time, Array#times
method result. @see #times
Boolean check for any times #mark
ed. Must mark atleast twice for this to be true.
@return [true,false]
A collection of times #mark
ed. Each represented in Float64 of seconds since the last #mark
.
@return [Array
Total time accumulated.
@return [Integer,Float64] Returns total time since start.