flak rss random

vmtimed

My laptop spends a lot of time running Windows, with OpenBSD in a VM, which I imagine works better than trying to run Windows in QEMU. As described, the problem is the clock drifts. A lot. If my laptop is suspended eight hours overnight, there’s no way ntpd is going to fix that before my coffee is ready unless I plant the coffee beans and wait for them to turn into second generation beans. A previous fix for ntpd also didn’t garner much love. Nobody knows how hard my life is...

Third time’s the charm. I’m going back to the original idea of using the vmt timedelta sensor. Many times I resume my laptop outside my house, so it’s best not to depend on network access, particularly to my router’s ntpd. The Windows host keeps accurate enough time. All that’s needed is a small program to read the sensor and reset the time whenever it’s wrong. It’s called vmtimed because vmttimed looked awkward. The vmt sensor only updates itself every 15 seconds, so vmtimed does the same and spends the rest of its time sleeping. If the time is off by 60 seconds, we reset to whatever it should be.

vmtimed.c

Posted 29 Nov 2013 04:28 by tedu Updated: 10 Jun 2014 04:16
Tagged: openbsd software