Regular API function

simGetSystemTimeInMs

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 V-REP
-2: the function returns a time as follows:
// On Windows:
returnedValue=TimeGetTime();

// On MacOS / Linux:
struct timeval now;
gettimeofday(&now,NULL);
returnValue=now.tv_sec*1000+now.tv_usec/1000;
C return value
a time in milliseconds as described here above.
Lua synopsis
number systemTimeOrTimeDiff=simGetSystemTimeInMs(number previousTime)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page