diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-30 15:00:12 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-30 15:00:12 +0000 |
| commit | 72fdc42837649c8fd2988e7712749ca6d30c246b (patch) | |
| tree | 3771797df1d09540f20d74f55086885490e6a439 /ext/tk/sample/tkrttimer.rb | |
| parent | 8c20f66c485649560ed6082233dbe03cdcdaf7a3 (diff) | |
| download | ruby-72fdc42837649c8fd2988e7712749ca6d30c246b.tar.gz ruby-72fdc42837649c8fd2988e7712749ca6d30c246b.tar.xz ruby-72fdc42837649c8fd2988e7712749ca6d30c246b.zip | |
revert git backfire in r15860; sorry
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkrttimer.rb')
| -rw-r--r-- | ext/tk/sample/tkrttimer.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/tk/sample/tkrttimer.rb b/ext/tk/sample/tkrttimer.rb index 531f4a8d5..0abd4ecbd 100644 --- a/ext/tk/sample/tkrttimer.rb +++ b/ext/tk/sample/tkrttimer.rb @@ -17,8 +17,17 @@ TkLabel.new(f2, :text=>'use TkRTTimer class').pack label2 = TkLabel.new(:parent=>f2, :relief=>:raised, :width=>10).pack(:fill=>:both) -TkLabel.new(:text=>'Interval setting of each timer is 10 ms.', - :padx=>10, :pady=>5).pack +TkLabel.new(:padx=>10, :pady=>5, :justify=>'left', :text=><<EOT).pack +Interval setting of each timer object is 10 ms. +Each timer object counts up the value on each callback +(the value is not the clock data). +The count of the TkTimer object is delayed by execution +time of callbacks and inaccuracy of interval. +On the other hand, the count of the TkRTTimer object is +not delayed. Its callback interval is not accurate too. +But it can compute error correction about the time when +a callback should start. +EOT # define the procedure repeated by the TkTimer object tick = proc{|aobj| #<== TkTimer object |
