diff --git a/.ocamlformat b/.ocamlformat new file mode 100644 index 00000000..2e686658 --- /dev/null +++ b/.ocamlformat @@ -0,0 +1,2 @@ +version = 0.15.0 +disable = true diff --git a/lib/bindings/clock_stubs.c b/lib/bindings/clock_stubs.c index a5998511..aaeb3695 100644 --- a/lib/bindings/clock_stubs.c +++ b/lib/bindings/clock_stubs.c @@ -40,3 +40,10 @@ caml_get_monotonic_time(value v_unit) CAMLparam1(v_unit); CAMLreturn(caml_copy_int64(solo5_clock_monotonic())); } + +CAMLprim value +caml_get_wall_clock(value v_unit) +{ + CAMLparam1(v_unit); + CAMLreturn(caml_copy_int64(solo5_clock_wall())); +} diff --git a/lib/dune b/lib/dune index 645a725e..efc59b19 100644 --- a/lib/dune +++ b/lib/dune @@ -2,20 +2,24 @@ (name oS) (public_name mirage-xen) (libraries lwt cstruct xenstore.client shared-memory-ring-lwt lwt-dllist - mirage-profile logs io-page fmt mirage-runtime bheap duration)) + mirage-profile logs io-page fmt mirage-runtime bheap duration)) (rule - (deps (source_tree bindings)) + (deps + (source_tree bindings)) (targets libmirage-xen_bindings.a) (action - (no-infer - (progn - (chdir bindings (run %{make})) - (copy bindings/libmirage-xen_bindings.a libmirage-xen_bindings.a))))) + (no-infer + (progn + (chdir + bindings + (run %{make})) + (copy bindings/libmirage-xen_bindings.a libmirage-xen_bindings.a))))) (include_subdirs unqualified) (install (section lib) - (files (bindings/mirage-xen.pc as ../pkgconfig/mirage-xen.pc) - (libmirage-xen_bindings.a as libmirage-xen_bindings.a))) + (files + (bindings/mirage-xen.pc as ../pkgconfig/mirage-xen.pc) + (libmirage-xen_bindings.a as libmirage-xen_bindings.a)))