std::chrono::time_point OldTime= std::chrono::now();
while(true)
{
const std::chrono::time_point CurrentTime = std::chrono::now();
const double DeltaTime = std::chrono::duration_cast<std::chrono::milliseconds>(CurrentTime - OldTime) * 1000.0;
OldTime = CurrentTime;
//작업
std::this_thread::sleep_for(std::chrono::milliseconds(3)));
}
이유는 모르겠는데 이게 안 나온다
milliseconds로 3초 재워둬서 평범하게 나와야지 정상일 거 같은데 nanoseconds에서 1로 잡혀
뭐가 문제인지 좆나 모르겠어
중간에 루프 건든 적 없고 OldTime, CurrentTime도 건든 적이 없는데
댓글 0