Skip to content
Snippets Groups Projects
Commit b3708ac2 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

SL-15200: Use new LLApp::sleep() in LLPurgeDiskCacheThread::run().

parent d313d702
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
*/ */
#include "linden_common.h" #include "linden_common.h"
#include "llapp.h"
#include "llassettype.h" #include "llassettype.h"
#include "lldir.h" #include "lldir.h"
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
...@@ -371,17 +372,10 @@ LLPurgeDiskCacheThread::LLPurgeDiskCacheThread() : ...@@ -371,17 +372,10 @@ LLPurgeDiskCacheThread::LLPurgeDiskCacheThread() :
void LLPurgeDiskCacheThread::run() void LLPurgeDiskCacheThread::run()
{ {
constexpr F64 CHECK_INTERVAL = 60; constexpr long CHECK_INTERVAL = 60;
mTimer.setTimerExpirySec(CHECK_INTERVAL);
mTimer.start();
do while (LLApp::instance()->sleep(std::chrono::seconds(CHECK_INTERVAL)))
{ {
if (mTimer.checkExpirationAndReset(CHECK_INTERVAL)) LLDiskCache::instance().purge();
{ }
LLDiskCache::instance().purge();
}
ms_sleep(100);
} while (!isQuitting());
} }
...@@ -194,8 +194,5 @@ class LLPurgeDiskCacheThread : public LLThread ...@@ -194,8 +194,5 @@ class LLPurgeDiskCacheThread : public LLThread
protected: protected:
void run() override; void run() override;
private:
LLTimer mTimer;
}; };
#endif // _LLDISKCACHE #endif // _LLDISKCACHE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment