class MultimediaParadise::Waveform::Log
Attributes
io[RW]
Public Class Methods
Public Instance Methods
done!(message = '')
click to toggle source
end!()
click to toggle source
#¶ ↑
end!¶ ↑
Returns the elapsed time from the most recently started benchmark clock and ends the benchmark, so that a subsequent call to .end! will return the elapsed time from the previously started benchmark clock.
#¶ ↑
# File lib/multimedia_paradise/audio/waveform/log.rb, line 72 def end! elapsed = (Time.now - @benchmarks[@current]) @current -= 1 elapsed end
out(i)
click to toggle source
start!()
click to toggle source
#¶ ↑
start!¶ ↑
Starts a new benchmark clock and returns the index of the new clock.
If .start! is called again before .end! then the time returned will be the elapsed time from the next call to start!, and calling .end! again will return the time from this call to start! (that is, the clocks are LIFO).
#¶ ↑
# File lib/multimedia_paradise/audio/waveform/log.rb, line 60 def start! (@benchmarks ||= []) << Time.now @current = @benchmarks.size - 1 end
time?(index)
click to toggle source