Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Timocop committed Dec 14, 2022
1 parent 292978e commit e1edd1d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/psmoveservice/Server/PSMoveService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ class PSMoveServiceImpl

while (m_status->state() != boost::application::status::stoped)
{
#if defined(WIN32)
//###Externet Change the minimum resolution for periodic timers on Windows to 1ms.
// On some windows systems the default minimum resolution is ~15ms which can have undesiered effects for tracking.
// This is needed for Windows 10 2004 and prior versions since any app can change the minimum resolution globaly.
timeBeginPeriod(1);
#endif


if (m_status->state() != boost::application::status::paused)
{
update();
Expand Down Expand Up @@ -136,9 +128,15 @@ class PSMoveServiceImpl
}
}

std::this_thread::sleep_for(std::chrono::milliseconds(cfg.thread_sleep_ms));
#if defined(WIN32)
//###Externet Change the minimum resolution for periodic timers on Windows to 1ms.
// On some windows systems the default minimum resolution is ~15ms which can have undesiered effects for tracking.
// This is needed for Windows 10 2004 and prior versions since any app can change the minimum resolution globaly.
timeBeginPeriod(1);
std::this_thread::sleep_for(std::chrono::milliseconds(cfg.thread_sleep_ms));
timeEndPeriod(1);
#else
std::this_thread::sleep_for(std::chrono::milliseconds(cfg.thread_sleep_ms));
#endif
}
}
Expand Down

0 comments on commit e1edd1d

Please sign in to comment.