package mirage

  1. Overview
  2. Docs
The MirageOS library operating system

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mirage-4.0.0.tbz
sha256=f804161872de6cf20699364f09d03370ed06aafffb12f1d586190832c73a194d
sha512=75c1c1cac4c6f862c0055381c7ced123785193234b40da8a8e238cb289cba1a4494378587c4edf2ed872aee7fbfc756f84087941c1037ac19cbd1733ff6cca6a

doc/src/mirage.impl/mirage_impl_time.ml.html

Source file mirage_impl_time.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
open Functoria
module Key = Mirage_key

type time = TIME

let time = Type.v TIME

let default_time =
  let unix_time =
    impl ~packages:[ package "mirage-time" ] "Unix_os.Time" time
  in
  let solo5_time =
    impl ~packages:[ package "mirage-time" ] "Solo5_os.Time" time
  in
  let xen_time = impl ~packages:[ package "mirage-time" ] "Xen_os.Time" time in
  match_impl
    Key.(value target)
    [
      (`Unix, unix_time);
      (`MacOSX, unix_time);
      (`Xen, xen_time);
      (`Qubes, xen_time);
      (`Virtio, solo5_time);
      (`Hvt, solo5_time);
      (`Spt, solo5_time);
      (`Muen, solo5_time);
      (`Genode, solo5_time);
    ]
    ~default:unix_time