HighPrecisionClock and Server param window

Hi Chris,

The new nightly has an option to use a “high precision clock (recommended)”.

In the code on github it looks like this switches between MachClock and HighPrecisionClock. It looks like MachClock has been the default for a while. I couldn’t find any code corresponding to the HighPrecisionClock, and I didn’t see any documentation on it. Should we turn it on?

Also, with the new Server preferences window, does the Server now ever read setup_variables.xml? Does it read it when MWorks is upgraded?

You also seem to have removed the the “refresh_rate_hz” parameter. I was never sure what that did. I assume MWorks now gets the refresh rate from the hardware.

Thanks,
Mark

Hi Mark,

The new nightly has an option to use a “high precision clock (recommended)” … Should we turn it on?

Yes, I recommend that you turn it on. Actually, this has been available since 0.5.1. From the release notes:

Added a new clock plugin (HighPrecisionClock) that supports more precise wait/sleep intervals (and, thereby, more accurate firing times for scheduled actions) than the old clock. Currently, it is not used by default but can be enabled via the #realtimeComponents variable.

By “more precise”, I mean that waits should be less likely to overshoot their target duration. That’s not to say that we had a big problem with that with the old clock, but the new clock should still be better (and certainly no worse).

Also, with the new Server preferences window, does the Server now ever read setup_variables.xml? Does it read it when MWorks is upgraded?

There’s no change in how MWorks uses setup_variables.xml. Changes made via the MWServer preferences window are written to the user-specific setup_variables file (which is created if it doesn’t already exist).

You also seem to have removed the the “refresh_rate_hz” parameter. I was never sure what that did. I assume MWorks now gets the refresh rate from the hardware.

It never did anything (at least, not since I’ve been working on MWorks). MWorks never attempts to change the display’s refresh rate. That’s left to the user (via System Preferences or some third-party software).

Cheers,
Chris