2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2002-10-25 01:07:56 +04:00
|
|
|
// $Id: slowdown_timer.h,v 1.7 2002-10-24 21:07:52 bdenney Exp $
|
2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2001-08-18 07:28:23 +04:00
|
|
|
|
2001-09-24 09:08:25 +04:00
|
|
|
#if BX_USE_SLOWDOWN_TIMER
|
2001-08-18 07:28:23 +04:00
|
|
|
|
|
|
|
class bx_slowdown_timer_c {
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct {
|
|
|
|
Bit64u start_time;
|
|
|
|
Bit64u start_emulated_time;
|
|
|
|
Bit64u lasttime;
|
|
|
|
|
|
|
|
int timer_handle;
|
|
|
|
|
2001-08-22 05:21:30 +04:00
|
|
|
float MAXmultiplier;
|
2001-08-18 07:28:23 +04:00
|
|
|
Bit64u Q; // (Q (in seconds))
|
|
|
|
} s;
|
|
|
|
|
|
|
|
public:
|
|
|
|
bx_slowdown_timer_c();
|
|
|
|
|
2002-10-25 01:07:56 +04:00
|
|
|
void init(void);
|
2002-08-27 23:54:46 +04:00
|
|
|
void reset(unsigned type);
|
2001-08-18 07:28:23 +04:00
|
|
|
|
|
|
|
static void timer_handler(void * this_ptr);
|
|
|
|
|
|
|
|
void handle_timer();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
extern bx_slowdown_timer_c bx_slowdown_timer;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|