* ext/tk/lib/tk/timer.rb (TkRTTimer): forgot to reset the callback

time. So, 'continue' do all callbacks between 'stop' and 'continue'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2005-03-14 03:23:01 +00:00
parent a00bc63ac3
commit e58c2dc6a8
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Mar 14 12:21:03 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/timer.rb (TkRTTimer): forgot to reset the callback
time. So, 'continue' do all callbacks between 'stop' and 'continue'.
Mon Mar 14 00:13:49 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/timer.rb (TkRTTimer): correct calculation of offset

View File

@ -4002,7 +4002,7 @@ end
#Tk.freeze
module Tk
RELEASE_DATE = '2005-03-13'.freeze
RELEASE_DATE = '2005-03-14'.freeze
autoload :AUTO_PATH, 'tk/variable'
autoload :TCL_PACKAGE_PATH, 'tk/variable'

View File

@ -525,10 +525,17 @@ class TkRTTimer < TkTimer
def cancel
super()
@est_time = nil
@cb_start_time = Time.now
self
end
alias stop cancel
def continue(wait=nil)
fail RuntimeError, "is already running" if @running
@cb_start_time = Time.now
super(wait)
end
def set_interval(interval)
super(interval)
@est_time = nil