Regular API function

simGetSystemTimeInMs / sim.getSystemTimeInMs

Description Retrieves a time in milliseconds.
C synopsis simUInt simGetSystemTimeInMs(simInt previousTime)
C parameters
previousTime: value that indicates how the command should operate:
>=0: the function returns a time difference with previousTime. PreviousTime must have been previously retrieved with the -1 argument below.
-1: the function returns a time relative to an arbitrary time. Use this to measure time differences within CoppeliaSim
-2: the function returns a time as follows:
// On Windows:

// On MacOS / Linux:
struct timeval now;
C return value
a time in milliseconds as described here above.
Lua synopsis
number systemTimeOrTimeDiff=sim.getSystemTimeInMs(number previousTime)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
B0-based remote API: simxGetTimeInMs
Legacy remote API: -

All regular API functions on one page