2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
// $Id: slowdown_timer.h,v 1.5 2001-10-03 13:10:38 bdenney Exp $
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
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();
|
|
|
|
|
|
|
|
int init();
|
|
|
|
|
|
|
|
static void timer_handler(void * this_ptr);
|
|
|
|
|
|
|
|
void handle_timer();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
extern bx_slowdown_timer_c bx_slowdown_timer;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|