File: is_active.ml

package info (click to toggle)
ocaml-luv 0.5.14-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,504 kB
  • sloc: ml: 11,130; makefile: 6,223; sh: 4,592; ansic: 1,517; python: 38
file content (7 lines) | stat: -rw-r--r-- 352 bytes parent folder | download
1
2
3
4
5
6
7
(* Checks is_active for handles in general. This isn't specifically a timer
   test. Timers are just one of the simplest kinds of handle. *)
let () =
  Helpers.with_timer @@ fun timer ->
  Printf.printf "%b\n" (Luv.Handle.is_active timer);
  Luv.Timer.start timer 0 ignore |> ok "start" @@ fun () ->
  Printf.printf "%b\n" (Luv.Handle.is_active timer)