summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2002-09-12 10:12:26 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2002-09-12 10:12:26 +0000
commit6cc217cc5e74c081c451329be051a21f7a47930e (patch)
tree36d9e7b3d0ac5c91a414933af1a8b385d5a2a491 /otherlibs/labltk
parent7cc6e362ae8e52ff7cd18b02f0c981151a4f8ed4 (diff)
better debugging message
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5128 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk')
-rw-r--r--otherlibs/labltk/support/timer.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/otherlibs/labltk/support/timer.ml b/otherlibs/labltk/support/timer.ml
index 1d15c1afd..ada8100fd 100644
--- a/otherlibs/labltk/support/timer.ml
+++ b/otherlibs/labltk/support/timer.ml
@@ -31,15 +31,21 @@ type t = tkTimer * cbid (* the token and the cb id *)
(* A timer is used only once, so we must clean the callback table *)
let add ~ms ~callback =
+ if !Protocol.debug then begin
+ prerr_string "Timer.add "; flush stderr;
+ end;
let id = new_function_id () in
+ if !Protocol.debug then begin
+ prerr_string "id="; prerr_cbid id; flush stderr;
+ end;
let wrapped _ =
clear_callback id; (* do it first in case f raises exception *)
callback() in
Hashtbl.add callback_naming_table id wrapped;
+ let t = internal_add_timer ms id in
if !Protocol.debug then begin
- prerr_cbid id; prerr_endline " for timer"
+ prerr_endline " done"
end;
- let t = internal_add_timer ms id in
t,id
let set ~ms ~callback = ignore (add ~ms ~callback);;