#ifndef MAIN_TIME_H #define MAIN_TIME_H #ifdef __cplusplus extern "C" { #endif #include /* Constants */ #define NSEC_PER_SEC 1000000000ULL /* Initialization */ void time_init(void); /* Time conversion functions */ uint64_t time_to_world(uint64_t local); uint64_t time_to_local(uint64_t world); /* External time synchronization */ void time_ext_init(uint64_t local, uint64_t world); void time_ext_sync(uint64_t local, uint64_t world); /* Helper functions */ void time_printf(const char *label, uint64_t local); #ifdef __cplusplus } #endif #endif