(************************************************************ tk_idle.ml Created : Sun Jun 6 20:51:41 2004 Last modified: Sun Jun 06 20:58:46 2004 Compile: ocamlc -I +labltk -dtypes labltk.cma frxlib.cma tk_idle.ml -o tk_idle # FTP Directory: sources/ocaml # ************************************************************) (** @author Takashi Masuyama *) open Tk let _ = let window = openTk () in let rec idlef () = print_endline "hello world"; ignore (Timer.add ~ms:2000 ~callback:(fun () -> Frx_after.idle idlef)) in Frx_after.idle idlef; mainLoop ()