1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_TIMER_H_BASE_
|
|
|
|
#define _WX_TIMER_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1998-07-10 10:15:17 -04:00
|
|
|
#if defined(__WXMSW__)
|
1998-05-20 10:01:55 -04:00
|
|
|
#include "wx/msw/timer.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
1998-08-14 20:23:28 -04:00
|
|
|
#include "wx/motif/timer.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXGTK__)
|
1998-05-20 10:01:55 -04:00
|
|
|
#include "wx/gtk/timer.h"
|
1998-08-07 16:23:17 -04:00
|
|
|
#elif defined(__WXQT__)
|
|
|
|
#include "wx/qt/timer.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
|
|
|
#include "wx/mac/timer.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
|
|
|
#include "wx/os2/timer.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXSTUBS__)
|
|
|
|
#include "wx/stubs/timer.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
1999-09-29 15:40:04 -04:00
|
|
|
class wxChrono
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxChrono();
|
|
|
|
|
|
|
|
void Start(long t=0);
|
|
|
|
void Pause();
|
|
|
|
void Resume();
|
|
|
|
|
|
|
|
long Time();
|
|
|
|
|
|
|
|
private:
|
|
|
|
long m_t0;
|
|
|
|
long m_pause;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Timer functions (milliseconds)
|
|
|
|
void WXDLLEXPORT wxStartTimer();
|
|
|
|
|
|
|
|
// Gets time since last wxStartTimer or wxGetElapsedTime
|
|
|
|
long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
|
|
|
|
|
|
|
|
// EXPERIMENTAL: comment this out if it doesn't compile.
|
|
|
|
bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved);
|
|
|
|
|
|
|
|
// Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
|
|
|
|
long WXDLLEXPORT wxGetCurrentTime();
|
|
|
|
|
|
|
|
// Get number of milliseconds since 00:00:00 GMT, Jan 1st 1970.
|
1999-09-29 15:51:04 -04:00
|
|
|
long WXDLLEXPORT wxGetCurrentMTime();
|
1999-09-29 15:40:04 -04:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_TIMER_H_BASE_
|