diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-14 03:23:01 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-14 03:23:01 +0000 |
| commit | 33eba44a69d3e4b5a6b0ae61224d0673917ca301 (patch) | |
| tree | 25eb93224fc61808cb7587e875d0d4a1c40f6a5d | |
| parent | 0ca3437af0fbadd66a330f8f8c4845f761900506 (diff) | |
| download | ruby-33eba44a69d3e4b5a6b0ae61224d0673917ca301.tar.gz ruby-33eba44a69d3e4b5a6b0ae61224d0673917ca301.tar.xz ruby-33eba44a69d3e4b5a6b0ae61224d0673917ca301.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/tk/lib/tk.rb | 2 | ||||
| -rw-r--r-- | ext/tk/lib/tk/timer.rb | 7 |
3 files changed, 13 insertions, 1 deletions
@@ -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 diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 0e3f883fb..d246cd9a0 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -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' diff --git a/ext/tk/lib/tk/timer.rb b/ext/tk/lib/tk/timer.rb index e8379521b..aa2272f9b 100644 --- a/ext/tk/lib/tk/timer.rb +++ b/ext/tk/lib/tk/timer.rb @@ -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 |
