summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/clock.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk/clock.rb')
-rw-r--r--ext/tk/lib/tk/clock.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/tk/lib/tk/clock.rb b/ext/tk/lib/tk/clock.rb
index 3581152c8b..4e9438f5ab 100644
--- a/ext/tk/lib/tk/clock.rb
+++ b/ext/tk/lib/tk/clock.rb
@@ -5,13 +5,17 @@ require 'tk'
module Tk
module Clock
+ include Tk
+ extend TkCore
+
def self.add(clk, *args)
tk_call_without_enc('clock','add', clk, *args).to_i
end
def self.clicks(ms=nil)
+ ms = ms.to_s if ms.kind_of?(Symbol)
case ms
- when nil
+ when nil, ''
tk_call_without_enc('clock','clicks').to_i
when /^mic/
tk_call_without_enc('clock','clicks','-microseconds').to_i