git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19618
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// if we are unlucky and the latter combines information from two sources.
#include "wx/mgl/private.h"
extern "C" ulong _EVT_getTicks();
// if we are unlucky and the latter combines information from two sources.
#include "wx/mgl/private.h"
extern "C" ulong _EVT_getTicks();
- #define GetMillisecondsTime() _EVT_getTicks()
+ #define GetMillisecondsTime _EVT_getTicks
+
+ typedef ulong wxTimerTick_t;
-// #define GetMillisecondsTime() wxGetLocalTimeMillis().ToLong()
- // Suppresses the debug warning in ToLong. FIXME: check
- // that we don't drastically lose precision
- #define GetMillisecondsTime() (unsigned long) wxGetLocalTimeMillis().GetValue()
+ #define GetMillisecondsTime wxGetLocalTimeMillis
+
+ typedef wxLongLong wxTimerTick_t;
#endif
// ----------------------------------------------------------------------------
#endif
// ----------------------------------------------------------------------------
public:
wxTimerScheduler() : m_timers(NULL) {}
public:
wxTimerScheduler() : m_timers(NULL) {}
- void QueueTimer(wxTimerDesc *desc, unsigned long when = 0);
+ void QueueTimer(wxTimerDesc *desc, wxTimerTick_t when = 0);
void RemoveTimer(wxTimerDesc *desc);
void NotifyTimers();
void RemoveTimer(wxTimerDesc *desc);
void NotifyTimers();
wxTimerDesc *m_timers;
};
wxTimerDesc *m_timers;
};
-void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when)
+void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, wxTimerTick_t when)
{
if ( desc->running )
return; // already scheduled
{
if ( desc->running )
return; // already scheduled
{
bool oneShot;
volatile bool timerDeleted;
{
bool oneShot;
volatile bool timerDeleted;
- unsigned long now = GetMillisecondsTime();
+ wxTimerTick_t now = GetMillisecondsTime();
wxTimerDesc *desc;
while ( m_timers && m_timers->shotTime <= now )
wxTimerDesc *desc;
while ( m_timers && m_timers->shotTime <= now )