1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::libc::c_double;

extern "C" {
    pub fn CVGetCurrentHostTime() -> u64;
    pub fn CVGetHostClockFrequency() -> c_double;
    pub fn CVGetHostClockMinimumTimeDelta() -> u32;
}

pub fn get_current_host_time() -> u64 {
    unsafe { CVGetCurrentHostTime() }
}

pub fn get_host_clock_frequency() -> f64 {
    unsafe { CVGetHostClockFrequency() }
}

pub fn get_host_clock_minimum_time_delta() -> u32 {
    unsafe { CVGetHostClockMinimumTimeDelta() }
}