This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
14
unikernel/duniverse/mirage-mtime/lib_test/portable.ml
Normal file
14
unikernel/duniverse/mirage-mtime/lib_test/portable.ml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
let print_mtime c =
|
||||
Printf.printf "Monotonic clock says: %Ld nanoseconds\n"
|
||||
(Mirage_mtime.elapsed_ns c)
|
||||
|
||||
let print_period_mono c =
|
||||
match Mirage_mtime.period_ns c with
|
||||
| Some ns ->
|
||||
Printf.printf "The monotonic clock period is: %Ld nanoseconds\n" ns
|
||||
| None -> Printf.printf "Monotonic clock period unavailable\n"
|
||||
|
||||
let () =
|
||||
print_mtime ();
|
||||
print_mtime ();
|
||||
print_period_mono ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue