mirror of
https://github.com/overte-org/overte.git
synced 2025-08-12 14:53:58 +02:00
added some debugging to see why the servers are spinning out constantly checking for dirty tree
This commit is contained in:
parent
950f486e2e
commit
865d2d19f1
1 changed files with 6 additions and 2 deletions
|
@ -67,9 +67,13 @@ bool VoxelPersistThread::process() {
|
|||
uint64_t MSECS_TO_USECS = 1000;
|
||||
uint64_t USECS_TO_SLEEP = 100 * MSECS_TO_USECS; // every 100ms
|
||||
usleep(USECS_TO_SLEEP);
|
||||
uint64_t now = usecTimestampNow();
|
||||
uint64_t sinceLastSave = now - _lastSave;
|
||||
uint64_t intervalToCheck = _persistInterval * MSECS_TO_USECS;
|
||||
|
||||
|
||||
if ((usecTimestampNow() - _lastSave) > (_persistInterval * MSECS_TO_USECS)) {
|
||||
qDebug("checking if voxels are dirty.\n");
|
||||
if (sinceLastSave > intervalToCheck) {
|
||||
qDebug("checking if voxels are dirty. sinceLastSave=%llu intervalToCheck=%llu\n", sinceLastSave, intervalToCheck);
|
||||
// check the dirty bit and persist here...
|
||||
if (_tree->isDirty()) {
|
||||
_lastSave = usecTimestampNow();
|
||||
|
|
Loading…
Reference in a new issue