Kaydet (Commit) 9c7016b5 authored tarafından Tobias Madl's avatar Tobias Madl

Scheduler: Changed uLong to uInt32/uInt64

Change-Id: Ic60463027c7f1b2d513539adba834b8d8e0ce6d3
üst e379476e
...@@ -30,8 +30,8 @@ struct ImplSchedulerData ...@@ -30,8 +30,8 @@ struct ImplSchedulerData
Scheduler* mpScheduler; // Pointer to VCL Scheduler instance Scheduler* mpScheduler; // Pointer to VCL Scheduler instance
bool mbDelete; // Destroy this scheduler? bool mbDelete; // Destroy this scheduler?
bool mbInScheduler; // Scheduler currently processed? bool mbInScheduler; // Scheduler currently processed?
sal_uLong mnUpdateTime; // Last Update Time sal_uInt64 mnUpdateTime; // Last Update Time
sal_uLong mnUpdateStack; // Update Stack sal_uInt32 mnUpdateStack; // Update Stack
void Invoke(); void Invoke();
...@@ -59,7 +59,7 @@ protected: ...@@ -59,7 +59,7 @@ protected:
friend struct ImplSchedulerData; friend struct ImplSchedulerData;
virtual void SetDeletionFlags(); virtual void SetDeletionFlags();
virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; } virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; }
virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ); virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime );
public: public:
Scheduler(); Scheduler();
......
...@@ -27,12 +27,12 @@ class VCL_DLLPUBLIC Timer : public Scheduler ...@@ -27,12 +27,12 @@ class VCL_DLLPUBLIC Timer : public Scheduler
{ {
protected: protected:
Link maTimeoutHdl; // Callback Link Link maTimeoutHdl; // Callback Link
sal_uLong mnTimeout; sal_uInt64 mnTimeout;
bool mbAuto; bool mbAuto;
virtual void SetDeletionFlags() SAL_OVERRIDE; virtual void SetDeletionFlags() SAL_OVERRIDE;
virtual bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE; virtual bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) SAL_OVERRIDE; virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) SAL_OVERRIDE;
public: public:
Timer(); Timer();
...@@ -42,13 +42,13 @@ public: ...@@ -42,13 +42,13 @@ public:
/// of course, you can also sub-class and override 'Invoke' /// of course, you can also sub-class and override 'Invoke'
void SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; } void SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
const Link& GetTimeoutHdl() const { return maTimeoutHdl; } const Link& GetTimeoutHdl() const { return maTimeoutHdl; }
void SetTimeout( sal_uLong nTimeoutMs ); void SetTimeout( sal_uInt64 nTimeoutMs );
sal_uLong GetTimeout() const { return mnTimeout; } sal_uInt64 GetTimeout() const { return mnTimeout; }
virtual void Invoke() SAL_OVERRIDE; virtual void Invoke() SAL_OVERRIDE;
void Timeout() { Invoke(); } void Timeout() { Invoke(); }
Timer& operator=( const Timer& rTimer ); Timer& operator=( const Timer& rTimer );
virtual void Start() SAL_OVERRIDE; virtual void Start() SAL_OVERRIDE;
static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS ); static void ImplStartTimer( ImplSVData* pSVData, sal_uInt64 nMS );
}; };
/// An auto-timer is a multi-shot timer re-emitting itself at /// An auto-timer is a multi-shot timer re-emitting itself at
......
...@@ -316,8 +316,8 @@ struct ImplSVData ...@@ -316,8 +316,8 @@ struct ImplSVData
SalI18NImeStatus* mpImeStatus; // interface to ime status window SalI18NImeStatus* mpImeStatus; // interface to ime status window
SalSystem* mpSalSystem; // SalSystem interface SalSystem* mpSalSystem; // SalSystem interface
ResMgr* mpResMgr; // SV-Resource-Manager ResMgr* mpResMgr; // SV-Resource-Manager
sal_uLong mnTimerPeriod; // current timer period sal_uInt64 mnTimerPeriod; // current timer period
sal_uLong mnUpdateStack; // Scheduler on stack sal_uInt32 mnUpdateStack; // Scheduler on stack
ImplSVAppData maAppData; // indepen data for class Application ImplSVAppData maAppData; // indepen data for class Application
ImplSVGDIData maGDIData; // indepen data for Output classes ImplSVGDIData maGDIData; // indepen data for Output classes
ImplSVWinData maWinData; // indepen data for Windows classes ImplSVWinData maWinData; // indepen data for Windows classes
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <vcl/timer.hxx> #include <vcl/timer.hxx>
#include <saltimer.hxx> #include <saltimer.hxx>
#define MAX_TIMER_PERIOD ((sal_uLong)0xFFFFFFFF) #define MAX_TIMER_PERIOD ((sal_uInt64)0xFFFFFFFF)
void ImplSchedulerData::Invoke() void ImplSchedulerData::Invoke()
{ {
...@@ -116,8 +116,8 @@ void Scheduler::ProcessTaskScheduling( bool bTimer ) ...@@ -116,8 +116,8 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
ImplSchedulerData* pSchedulerData = NULL; ImplSchedulerData* pSchedulerData = NULL;
ImplSchedulerData* pPrevSchedulerData = NULL; ImplSchedulerData* pPrevSchedulerData = NULL;
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
sal_uLong nTime = tools::Time::GetSystemTicks(); sal_uInt64 nTime = tools::Time::GetSystemTicks();
sal_uLong nMinPeriod = MAX_TIMER_PERIOD; sal_uInt64 nMinPeriod = MAX_TIMER_PERIOD;
pSVData->mnUpdateStack++; pSVData->mnUpdateStack++;
if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer))) if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer)))
...@@ -168,7 +168,7 @@ void Scheduler::ProcessTaskScheduling( bool bTimer ) ...@@ -168,7 +168,7 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
pSVData->mnUpdateStack--; pSVData->mnUpdateStack--;
} }
sal_uLong Scheduler::UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) sal_uInt64 Scheduler::UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime )
{ {
// this period is only usefull for timer // this period is only usefull for timer
// so in this implementation it' only a pass through // so in this implementation it' only a pass through
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include <svdata.hxx> #include <svdata.hxx>
#include <salinst.hxx> #include <salinst.hxx>
#define MAX_TIMER_PERIOD ((sal_uLong)0xFFFFFFFF) #define MAX_TIMER_PERIOD ((sal_uInt64)0xFFFFFFFF)
void Timer::ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS ) void Timer::ImplStartTimer( ImplSVData* pSVData, sal_uInt64 nMS )
{ {
if ( !nMS ) if ( !nMS )
nMS = 1; nMS = 1;
...@@ -54,10 +54,10 @@ bool Timer::ReadyForSchedule( bool bTimer ) ...@@ -54,10 +54,10 @@ bool Timer::ReadyForSchedule( bool bTimer )
return (mpSchedulerData->mnUpdateTime + mnTimeout) <= tools::Time::GetSystemTicks(); return (mpSchedulerData->mnUpdateTime + mnTimeout) <= tools::Time::GetSystemTicks();
} }
sal_uLong Timer::UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) sal_uInt64 Timer::UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime )
{ {
sal_uLong nNewTime = tools::Time::GetSystemTicks(); sal_uInt64 nNewTime = tools::Time::GetSystemTicks();
sal_uLong nDeltaTime; sal_uInt64 nDeltaTime;
//determine smallest time slot //determine smallest time slot
if( mpSchedulerData->mnUpdateTime == nTime ) if( mpSchedulerData->mnUpdateTime == nTime )
{ {
...@@ -114,7 +114,7 @@ void Timer::Start() ...@@ -114,7 +114,7 @@ void Timer::Start()
Timer::ImplStartTimer( pSVData, mnTimeout ); Timer::ImplStartTimer( pSVData, mnTimeout );
} }
void Timer::SetTimeout( sal_uLong nNewTimeout ) void Timer::SetTimeout( sal_uInt64 nNewTimeout )
{ {
mnTimeout = nNewTimeout; mnTimeout = nNewTimeout;
// if timer is active then renew clock // if timer is active then renew clock
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment