Lua parameters |
deltaTime: the minimum time duration to wait. If the function was called at simulation time X (or real-time X), then the function will return when simulation time>=X+deltaTime (or when real-time>=X+deltaTime)
simulationTime: indicates whether we want to wait in terms of simulation- or real-time. Can be omitted (is true by default)
|
Lua return values
|
deltaTimeLeft: the "wait resolution" of this function is the simulation time step, and the simWait command may overshoot the requested waiting time. deltaTimeLeft is the negative overshoot time. If the function was called at simulation time X, and the function returned at simulation time Y, then deltaTimeLeft is deltaTime-(Y-X). In case of an error, deltaTimeLeft is nil. deltaTimeLeft is also memorized internally on a thread-basis and used as compensation or correction factor in subsequent blocking commands. deltaTimeLeft is 0 if the simulationTime argument was false
|