How does clock_ms() work?

I asked AI help, and I see it elaborated more or less all topic we have on the community regarding timing and arsim:

ARsim runs as a non-real-time application on top of the Windows operating system. While a physical PLC uses a highly accurate hardware clock, ARsim timing is reliant on Windows thread scheduling.

The Result: The actual time elapsed between cyclic tasks may experience significant jitter or drift. If you use clock_ms() to measure exact physical execution times (like sub-millisecond task durations), your measurements will reflect Windows performance rather than true PLC capability.

=====
How to deal with clock_ms() counting longer than 24days? - Ask Questions / Programming - B&R Community

Ciao
Valerio