2017-10-04 07:07:04 +02:00
|
|
|
/*
|
2019-08-03 19:43:48 +02:00
|
|
|
* This software is licensed under the terms of the MIT License.
|
2017-10-04 07:07:04 +02:00
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
2019-01-23 21:10:43 +01:00
|
|
|
* Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>.
|
2019-07-03 20:00:56 +02:00
|
|
|
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
2017-10-04 07:07:04 +02:00
|
|
|
*/
|
|
|
|
|
2021-08-12 23:09:01 +02:00
|
|
|
#pragma once
|
2017-11-25 20:45:11 +01:00
|
|
|
#include "taisei.h"
|
2017-10-04 07:07:04 +02:00
|
|
|
|
2019-01-09 04:25:10 +01:00
|
|
|
typedef uint64_t hrtime_t;
|
|
|
|
typedef int64_t shrtime_t;
|
|
|
|
#define PRIuTIME PRIu64
|
|
|
|
#define PRIdTIME PRId64
|
|
|
|
#define HRTIME_C(value) UINT64_C(value)
|
|
|
|
|
|
|
|
// picoseconds. like super duper accurate, man
|
|
|
|
#define HRTIME_RESOLUTION HRTIME_C(1000000000000)
|
2017-11-11 19:47:15 +01:00
|
|
|
|
2017-10-04 07:07:04 +02:00
|
|
|
void time_init(void);
|
|
|
|
void time_shutdown(void);
|
2017-11-11 19:47:15 +01:00
|
|
|
hrtime_t time_get(void);
|