2017-10-04 07:07:04 +02:00
|
|
|
/*
|
|
|
|
* This software is licensed under the terms of the MIT-License
|
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
2018-01-04 18:14:31 +01:00
|
|
|
* Copyright (c) 2011-2018, Lukas Weber <laochailan@web.de>.
|
|
|
|
* Copyright (c) 2012-2018, Andrei Alexeyev <akari@alienslab.net>.
|
2017-10-04 07:07:04 +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);
|