Something went wrong. Try again.
My own corner of monopam
Something went wrong. Try again.
477 B · 11 lines
OCaml
at main
123456789101112(* One task drawn by [Console_eio.run] on the process's real clock, which the work moves by 0.2 s, so a display that reads that clock prints 0.2s and one whose clock the cram environment stopped prints 0.0s. *)
let () = Eio_main.run @@ fun env -> let clock = Eio.Stdenv.clock env in Console_eio.run ~clock ~ppf:Format.std_formatter @@ fun display -> let task = Console.Display.task display "Working" in Eio.Time.sleep clock 0.2; Console.Display.succeed task