You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example runs in about 800ms of real time (wall time does indeed reflect this) but the sim_time.instantaneous_frame_rate() is a solid 30 despite the counter.average_frame_rate(). This seems to disprove that the example sleeps for the remainder of the target frame time.
Adding a call to sleep_remaining seems to result in more accurate world time, but lots of slow frames, and it doesn’t matter much whether I target 30 or 60 fps, it seems to be off by roughly 5%.
Hi there!
From the examples in the docs:
Either the frame rate given by
counter.average_frame_rate()
is misreported, or this example does not in fact sleep as requested.This example runs in about 800ms of real time (wall time does indeed reflect this) but the
sim_time.instantaneous_frame_rate()
is a solid 30 despite thecounter.average_frame_rate()
. This seems to disprove that the example sleeps for the remainder of the target frame time.Adding a call to
sleep_remaining
seems to result in more accurate world time, but lots of slow frames, and it doesn’t matter much whether I target 30 or 60 fps, it seems to be off by roughly 5%.So my questions are:
tick
calls intended to do the sleeping itself?sleep_remaining
intended to go?The text was updated successfully, but these errors were encountered: