MILLISECS (System Variable)

Stores the number of milliseconds that have elapsed since the system was started.

(Read-only)
Type:Integer
Saved in:Not-saved
Initial value:Varies

The number of milliseconds stored in MILLISECS is equivalent to the value returned by the GetTickCount function in the Windows API. When the system is restarted, the number of milliseconds returned by the GetTickCount function is reset to 0.

You can compute the differences in time by subtracting the numbers returned by MILLISECS. The number of seconds can be computed by dividing the value of MILLISECS by 1000.

AutoLISP can be used to calculate the number of seconds from the value returned by MILLISECS.

(setq ms (getvar "MILLISECS"))
(setq seconds (/ ms 1000.0))
Note: Starting with AutoCAD 2017-based products, the time returned by the CDATE and DATE system variables no longer includes milliseconds. If you need to calculate differences in time smaller than one second, you will need to use MILLISECS.