module VueApp::Core::Helpers::Timer
Add timer_block
method
Public Instance Methods
timer_block(start_text, end_text, &block)
click to toggle source
Time counter
# File lib/vueapp/core/helpers/timer.rb, line 9 def timer_block(start_text, end_text, &block) start_time = Time.now log(start_text) block.call(self) end_time = (Time.now - start_time).round(2) log(end_text + end_time.to_s + 's') end