Create  Edit  Diff  Phillro Industries  Index  Search  Changes  History  Source  RSS  Note  wikifarm  Login

Phi::Timer

require "phi"
form = Phi::Form.new

timer1 = Phi::Timer.new
timer2 = Phi::Timer.new
timer3 = Phi::Timer.new
timer1.interval = 1100 # 1.1秒
timer2.interval = 2100 # 2.1秒
timer3.interval = 3100 # 3.1秒
timer1.on_timer=proc{p :timer1}
timer2.on_timer=proc{p :timer2}
timer3.on_timer=proc{p :timer3}

timer9 = Phi::Timer.new
timer9.interval = 10000 # 10秒
timer9.on_timer=proc{
  p :timer9_end
  timer1.enabled = false
  timer2.enabled = false
  timer3.enabled = false
  timer9.enabled = false
  form.close
}

form.show
Phi.mainloop
:timer1
:timer2
:timer1
:timer3
:timer1
:timer2
:timer1
:timer1
:timer3
:timer2
:timer1
:timer1
:timer2
:timer1
:timer3
:timer1
:timer9_end
require "phi"
require "methods_for_wiki"
puts Phi::Timer.methods_for_wiki

_dump => Phi::Component#_dump

component_count => Phi::Component#component_count

components => Phi::Component#components

enabled

enabled=

enabled?

event_handle

extend => Phi::Persistent#extend

interval

interval=

name

name=

on_timer

on_timer=

prop_info => Phi::Component#prop_info

write_res_file => Phi::Component#write_res_file

Last modified:2004/11/17 15:29:46
Keyword(s):
References:[Phi-Classes] [Phi-Constants]