diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-11-04 11:51:18 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:34:50 +0000 |
commit | 379f61127e9851e91197007c706c24f479da2b38 (patch) | |
tree | cf9e1d3733741933712c8e555b16273e02d43045 /svtools/source/misc/filechangedchecker.cxx | |
parent | 65a44185a66450aa5bc0c7bc6cdd1c2f0efdd672 (diff) |
Changed Idle Timers. into Idle
Change-Id: I44e33e9e04893237578eb685516fa5ffe43e397f
Diffstat (limited to 'svtools/source/misc/filechangedchecker.cxx')
-rw-r--r-- | svtools/source/misc/filechangedchecker.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx index 9d8a7133bec4..33d500815cd2 100644 --- a/svtools/source/misc/filechangedchecker.cxx +++ b/svtools/source/misc/filechangedchecker.cxx @@ -12,7 +12,7 @@ #include <svtools/filechangedchecker.hxx> FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost::function0<void>& rCallback) : - mTimer(), + mIdle(), mFileName(rFilename), mLastModTime(), mpCallback(rCallback) @@ -20,8 +20,8 @@ FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost: // Get the curren last file modified Status getCurrentModTime(mLastModTime); - // associate the callback function for the timer - mTimer.SetTimeoutHdl(LINK(this, FileChangedChecker, TimerHandler)); + // associate the callback function for the Idle + mIdle.SetIdleHdl(LINK(this, FileChangedChecker, TimerHandler)); //start the timer resetTimer(); @@ -29,12 +29,12 @@ FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost: void FileChangedChecker::resetTimer() { - //Start the timer if its not active - if(!mTimer.IsActive()) - mTimer.Start(); + //Start the Idle if its not active + if(!mIdle.IsActive()) + mIdle.Start(); - // Set a timeout of 3 seconds - mTimer.SetTimeout(3000); + // Set lowest Priority + mIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST); } bool FileChangedChecker::getCurrentModTime(TimeValue& o_rValue) const @@ -85,7 +85,7 @@ IMPL_LINK_NOARG(FileChangedChecker, TimerHandler) mpCallback(); } - // Reset the timer in any case + // Reset the Idle in any case resetTimer(); return 0; } |