MCPcopy Create free account
hub / github.com/chrxh/alien / syncSimulationWithRenderingIfDesired

Method syncSimulationWithRenderingIfDesired

source/EngineImpl/EngineWorker.cpp:536–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536void EngineWorker::syncSimulationWithRenderingIfDesired()
537{
538 if (_syncSimulationWithRendering && _isSimulationRunning) {
539 for (int i = 0; i < _syncSimulationWithRenderingRatio; ++i) {
540 calcTimesteps(1);
541 measureTPS();
542 slowdownTPS();
543 }
544 }
545}
546
547void EngineWorker::waitAndAllowAccess(std::chrono::microseconds const& duration)
548{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected