Use CoreTiming for MemoryWatcher.

This commit is contained in:
spxtr
2016-04-28 21:28:15 -07:00
parent aebff2c161
commit b9e9a5ee3d
3 changed files with 55 additions and 39 deletions

View File

@ -112,10 +112,6 @@ static bool s_request_refresh_info = false;
static int s_pause_and_lock_depth = 0;
static bool s_is_throttler_temp_disabled = false;
#ifdef USE_MEMORYWATCHER
static std::unique_ptr<MemoryWatcher> s_memory_watcher;
#endif
#ifdef ThreadLocalStorage
static ThreadLocalStorage bool tls_is_cpu_thread = false;
#else
@ -289,7 +285,7 @@ void Stop() // - Hammertime!
#endif
#ifdef USE_MEMORYWATCHER
s_memory_watcher.reset();
MemoryWatcher::Shutdown();
#endif
}
@ -361,7 +357,7 @@ static void CpuThread()
#endif
#ifdef USE_MEMORYWATCHER
s_memory_watcher = std::make_unique<MemoryWatcher>();
MemoryWatcher::Init();
#endif
// Enter CPU run loop. When we leave it - we are done.