Method: TkRTTimer#cb_call
- Defined in:
- ext/lib/tk/timer.rb
#cb_call ⇒ Object
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'ext/lib/tk/timer.rb', line 648 def cb_call if @est_time @offset_list.shift @cb_start_time = Time.now if @current_sleep == 0 @offset_list.push([ @offset_s - @cb_start_time.to_i, @offset_u - @cb_start_time.usec ]) else @offset_list.push([ @offset_s + (@est_time.to_i - @cb_start_time.to_i), @offset_u + (@est_time.usec - @cb_start_time.usec) ]) end end @cb_cmd.call end |