Converting MWorks time to wall-clock time

Hi Beshoy

Additionally, I would like to know if I can get the time on the experiment computer from the system variable.

MWorks time (i.e. the time stamp on events, and the times next to messages in the server console) measures elapsed time since MWServer was started. The actual wall-clock time isn’t used or stored anywhere by MWorks.

However, when an experiment is started, it announces both the MWorks version and the current date/time, e.g.

00:00:52:  Running MWorks (2019.05.01)
00:00:52:  Current date/time is Wed May  1 10:42:29 EDT 2019

Using the announced clock time and the corresponding MWorks time, you can compute the offset between the two clocks.

Be warned, however: The clock used by MWorks is “discontinuous”, in that it’s only running while the CPU is running (as it’s derived from a low-level, CPU clock). Hence, any offset you compute between it and wall-clock time becomes invalid if the computer goes to sleep.