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.
|
|
|
|
*/
|
2007-03-25 21:00:14 +00:00
|
|
|
|
2006-03-20 16:43:15 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header for timer functions
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-02-05 03:03:48 +00:00
|
|
|
#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
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2015-02-05 03:03:48 +00:00
|
|
|
fix64 timer_update();
|
|
|
|
__attribute_warn_unused_result
|
2010-12-10 23:18:03 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-03-25 21:00:14 +00:00
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#endif
|