Regular API function

simGetSystemTimeInMs / sim.getSystemTimeInMs

Description Retrieves a time in milliseconds.
simUInt simGetSystemTimeInMs(simInt previousTime)
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: returnedValue=TimeGetTime(); // On MacOS / Linux: struct timeval now; gettimeofday(&now,nullptr); returnValue=now.tv_sec*1000+now.tv_usec/1000;
return value
a time in milliseconds as described here above.
Lua synopsis
int systemTimeOrTimeDiff=sim.getSystemTimeInMs(int previousTime)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Python synopsis int systemTimeOrTimeDiff=sim.getSystemTimeInMs(int previousTime)