Files
bullet3/examples/pybullet/examples/profileTiming.py
Erwin Coumans 1f64a87abe Improve ChromeTraceUtil logging, allow filename to be specified.
Expose this ChromeTraceUtil  logging to C-API: start/statelogging and submitProfileTiming
pybullet.submitProfileTiming, and STATE_LOGGING_PROFILE_TIMINGS used in startStateLogging
added example for Python profileTiming.py and C++ b3RobotSimulatorClientAPI::submitProfileTiming
2017-05-04 17:51:40 -07:00

13 lines
231 B
Python

import pybullet as p
import time
p.connect(p.GUI)
t = time.time()+0.1
logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "haha")
while (time.time()<t):
p.submitProfileTiming("pythontest")
p.stopStateLogging(logId)