tomaka/redshirt

Time goes slowly on VirtualBox

Opened this issue · 2 comments

On QEmu, one second in the VM seems to match one second outside of the VM.
However, on VirtualBox, one second in the VM seems to take more like 2 or 3 real world seconds.

The problem is noticed by repeatedly printing the value of the monotonic clock. This isn't a problem with processes being woken up or something like that, but really about the clock advancing too slowly.

I suspect that we're not properly measuring the number of ticks per second at initialization.

On my Thinkpad X1, time seems to go at a normal rate.

Thanks to #536, one can see that in VirtualBox the monotonic clock increases by approximately 171800000 per real-life second, in other words time goes ~5.8 (1 divided by 0.171) times slower.