2
# tk/clock.rb : methods for clock command
11
def self.add(clk, *args)
12
tk_call_without_enc('clock','add', clk, *args).to_i
15
def self.clicks(ms=nil)
16
ms = ms.to_s if ms.kind_of?(Symbol)
19
tk_call_without_enc('clock','clicks').to_i
21
tk_call_without_enc('clock','clicks','-microseconds').to_i
23
tk_call_without_enc('clock','clicks','-milliseconds').to_i
25
tk_call_without_enc('clock','clicks','-milliseconds').to_i
29
def self.format(clk, form=nil)
31
tk_call('clock','format',clk,'-format',form)
33
tk_call('clock','format',clk)
37
def self.formatGMT(clk, form=nil)
39
tk_call('clock','format',clk,'-format',form,'-gmt','1')
41
tk_call('clock','format',clk,'-gmt','1')
45
def self.scan(str, base=nil)
47
tk_call('clock','scan',str,'-base',base).to_i
49
tk_call('clock','scan',str).to_i
53
def self.scanGMT(str, base=nil)
55
tk_call('clock','scan',str,'-base',base,'-gmt','1').to_i
57
tk_call('clock','scan',str,'-gmt','1').to_i
62
tk_call_without_enc('clock','seconds').to_i
65
tk_call_without_enc('clock','milliseconds').to_i
68
tk_call_without_enc('clock','microseconds').to_i