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 | fe95f1e2ca468907599d252c1f575323e786630a (patch) | |
tree | 25eb93224fc61808cb7587e875d0d4a1c40f6a5d /ext/tk/lib/tk | |
parent | 55f6c6d55785267a363883b0ec4ce348865dfb61 (diff) |
* 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/branches/ruby_1_8@8145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk')
-rw-r--r-- | ext/tk/lib/tk/timer.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/timer.rb b/ext/tk/lib/tk/timer.rb index e8379521ba..aa2272f9bb 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 |