Commit 41b04b6b authored by Philip Trettner's avatar Philip Trettner

no sleep for < 0 sec

parent 0267a3df
......@@ -460,7 +460,10 @@ void GlfwApp::endRender()
void GlfwApp::sleepSeconds(double seconds) const
{
std::this_thread::sleep_for(std::chrono::milliseconds((int)(seconds * 1000)));
if (seconds <= 0.0)
return;
std::this_thread::sleep_for(std::chrono::microseconds((int64_t)(seconds * 1000 * 1000)));
}
int GlfwApp::run(int argc, char *argv[])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment