orca/src/platform/platform_clock.h

35 lines
911 B
C
Raw Normal View History

/************************************************************//**
*
* @file: platform_clock.h
* @author: Martin Fouilleul
* @date: 07/03/2019
* @revision:
*
*****************************************************************/
#ifndef __PLATFORM_CLOCK_H_
#define __PLATFORM_CLOCK_H_
#include"util/typedefs.h"
2023-07-14 04:36:31 +00:00
#include"platform.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
typedef enum {
OC_CLOCK_MONOTONIC, // clock that increment monotonically
OC_CLOCK_UPTIME, // clock that increment monotonically during uptime
OC_CLOCK_DATE // clock that is driven by the platform time
} oc_clock_kind;
ORCA_API void oc_clock_init(); // initialize the clock subsystem
ORCA_API u64 oc_clock_timestamp(oc_clock_kind clock);
ORCA_API f64 oc_clock_time(oc_clock_kind clock);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif //__PLATFORM_CLOCK_H_