ViSP
2.9.0
|
#include <vpTime.h>
Static Public Member Functions | |
static double | measureTimeSecond () |
static double | measureTimeMs () |
static double | measureTimeMicros () |
static void | sleepMs (double t) |
static int | wait (double t0, double t) |
static void | wait (double t) |
Static Public Attributes | |
static double | minTimeForUsleepCall = 4 |
Time management and measurement.
The example below shows how to synchronize a loop to a given framerate.
|
static |
Return the time in microseconds since January 1st 1970.
Definition at line 112 of file vpTime.cpp.
|
static |
This time is in milli-seconds. Threshold to activate usleep() in waiting methods (see wait()). This threshold is needed, because usleep() is not accurate on many machines. Call sleep() functions during the time to wait minus vpTime::minTimeForUsleepCall. The rest of the time to wait is managed by a while loop.
Return the time in milliseconds since January 1st 1970.
Definition at line 86 of file vpTime.cpp.
Referenced by measureTimeSecond(), vpPose::ransac(), vpSimulatorAfma6::setPosition(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), vpSimulatorAfma6::vpSimulatorAfma6(), vpSimulatorViper850::vpSimulatorViper850(), and wait().
|
static |
Return the measured time in seconds since January 1st 1970.
Definition at line 225 of file vpTime.cpp.
References measureTimeMs().
Referenced by vpSimulatorAfma6::getPosition(), vpSimulatorViper850::getPosition(), vpSimulatorAfma6::getVelocity(), and vpSimulatorViper850::getVelocity().
|
static |
Sleep t miliseconds from now.
t | : Time to sleep in ms. |
Definition at line 236 of file vpTime.cpp.
|
static |
Wait t miliseconds after t0 (in ms).
The waiting is done by a call to usleep() if the time to wait is greater than vpTime::minTimeForUsleepCall.
t0 | : reference time (in ms) |
t | : time to wait (in ms) |
Definition at line 149 of file vpTime.cpp.
References measureTimeMs(), and minTimeForUsleepCall.
Referenced by vpRobotViper650::biasForceTorqueSensor(), vpRobotViper850::biasForceTorqueSensor(), vpDisplayGTK::getClick(), vpDisplayGTK::getClickUp(), vpRobotWireFrameSimulator::getInternalView(), vpDisplayGTK::getKeyboardEvent(), vpSimulatorAfma6::init(), vpTemplateTrackerZone::initClick(), vpSimulator::initMainApplication(), vpSimulator::mainLoop(), vp1394TwoGrabber::resetBus(), vpSimulatorAfma6::setPosition(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), and vpRobotBiclops::vpRobotBiclopsSpeedControlLoop().
|
static |
Wait t miliseconds from now.
The waiting is done by a call to usleep() if the time to wait is greater than vpTime::minTimeForUsleepCall.
t | : Time to wait in ms. |
Definition at line 189 of file vpTime.cpp.
References measureTimeMs(), and minTimeForUsleepCall.
|
static |
Definition at line 82 of file vpTime.h.
Referenced by vpRobotWireFrameSimulator::setSamplingTime(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), and wait().