Time Stamping

The timeStamp() and timeGetTime() functions give the time-of-day resp. the time since Windows started in milliseconds.

timeStamp()

The function returns the number of milliseconds since 00:00 hours that day. This is useful for timing operations (presuming you are not timing across midnight.)

EXAMPLE

start = timeStamp()
process_mesh() -- do some big job
end = timeStamp()
format "Processing took % seconds\n" ((end - start) / 1000.0)

   

timeGetTime()

The function retrieves the system time in milliseconds. The system time is the time elapsed since Windows was started.

The return value wraps around to 0 every 2^32 milliseconds, which is about 49.71 days.

This can cause problems in code that directly uses the timeGetTime() return value in computations, particularly where the value is used to control code execution.

You should always use the difference between two timeGetTime return values in computations.

Available in 3ds Max 2014 and higher.