ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can just use the system clock, and subtract the start time from the end time. In python

import time

start = time.clock()
# Do something
end = time.clock()

print end-start, 'seconds'

and in C++, use gettimeofday() or some similar function.