aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu/iodev/slowdown_timer.h
blob: 3b6b153a7192fd07eab5a10ebf26b2d58117f1ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/////////////////////////////////////////////////////////////////////////
// $Id: slowdown_timer.h,v 1.8 2003/08/19 00:10:38 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//

class bx_slowdown_timer_c : public logfunctions {

private:
  struct {
    Bit64u start_time;
    Bit64u start_emulated_time;
    Bit64u lasttime;

    int timer_handle;

    float MAXmultiplier;
    Bit64u Q; // (Q (in seconds))
  } s;

public:
  bx_slowdown_timer_c();

  void init(void);
  void reset(unsigned type);

  static void timer_handler(void * this_ptr);

  void handle_timer();

};

extern bx_slowdown_timer_c bx_slowdown_timer;