mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 11:46:34 +02:00
also switch OctreePersistThread to use std::this_thread::sleep_for()
This commit is contained in:
parent
99d35c37db
commit
fe14bc8e52
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,9 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
#include <time.h>
|
||||
|
@ -201,7 +204,7 @@ bool OctreePersistThread::process() {
|
|||
if (isStillRunning()) {
|
||||
quint64 MSECS_TO_USECS = 1000;
|
||||
quint64 USECS_TO_SLEEP = 10 * MSECS_TO_USECS; // every 10ms
|
||||
usleep(USECS_TO_SLEEP);
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(USECS_TO_SLEEP));
|
||||
|
||||
// do our updates then check to save...
|
||||
_tree->update();
|
||||
|
|
Loading…
Reference in a new issue