dxx-rebirth/common/include/timer.h

37 lines
722 B
C
Raw Normal View History

2006-03-20 16:43:15 +00:00
/*
2014-06-01 17:55:23 +00:00
* This file is part of the DXX-Rebirth project <http://www.dxx-rebirth.com/>.
* It is copyright by its individual contributors, as recorded in the
* project's Git history. See COPYING.txt at the top level for license
* terms and a link to the Git history.
*/
2006-03-20 16:43:15 +00:00
/*
*
* Header for timer functions
*
*/
#pragma once
2006-03-20 16:43:15 +00:00
2012-07-01 02:54:33 +00:00
#include "maths.h"
2006-03-20 16:43:15 +00:00
#ifdef __cplusplus
inline namespace dcx {
fix64 timer_update();
__attribute_warn_unused_result
fix64 timer_query();
2015-05-09 17:39:01 +00:00
void timer_delay_ms(unsigned milliseconds);
static inline void timer_delay(fix seconds)
{
timer_delay_ms(f2i(seconds * 1000));
}
2015-05-09 17:39:01 +00:00
void timer_delay_bound(unsigned bound);
static inline void timer_delay2(int fps)
{
timer_delay_bound(1000u / fps);
}
}
#endif