1 /* 2 * This software is licensed under the terms of the MIT License. 3 * See COPYING for further information. 4 * --- 5 * Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>. 6 * Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>. 7 */ 8 9 #ifndef IGUARD_hirestime_h 10 #define IGUARD_hirestime_h 11 12 #include "taisei.h" 13 14 typedef uint64_t hrtime_t; 15 typedef int64_t shrtime_t; 16 #define PRIuTIME PRIu64 17 #define PRIdTIME PRId64 18 #define HRTIME_C(value) UINT64_C(value) 19 20 // picoseconds. like super duper accurate, man 21 #define HRTIME_RESOLUTION HRTIME_C(1000000000000) 22 23 void time_init(void); 24 void time_shutdown(void); 25 hrtime_t time_get(void); 26 27 #endif // IGUARD_hirestime_h 28