(************************************************************ multiple_timer.ml Created : Sun Apr 4 20:16:51 2004 Last modified: Sun Apr 04 21:21:30 2004 Compile: ocamlc -dtypes -I +labltk labltk.cma multiple_timer.ml -o multiple_timer # FTP Directory: sources/ocaml # ************************************************************) (** @author Takashi Masuyama *) open Tk let _ = let win = openTk () in let l1 = Label.create ~text:"hoge" win in let l2 = Label.create ~text:"moge" win in pack [l1; l2]; ignore (Timer.add ~ms:500 ~callback:(fun () -> Label.configure ~text:"!!!!" l1)); ignore (Timer.add ~ms:300 ~callback:(fun () -> Label.configure ~text:"HOGE" l1)); mainLoop ()