13

I think it should be technically possible, but I don't know of any ways to do this in already existing software.

What I mean — the "hardware" clock in the VM should be able to run at different speeds, for example, several times slower than normal, or 100 times faster than normal. So, for example, a Thread.sleep(1000); call will not necessarily spend 1 second, but instead it could be any time, depending on the speed of the "hardware" clock. And as another example, if some game uses the timer to control speed of things' movements, then its speed will also change with the timer speed.

Also it would be interesting to know if the speed of actual hardware clock can be adjusted, and on which hardware.

Update

There are 2 seemingly similar questions, but they are about CPU speed, not timer speed (it's a totally different thing). So I think that this question is not a duplicate.

Display Name
  • 1,133

2 Answers2

7

Virtual-box support exists on a config level as explained on this official ticket:

Btw, this is

VBoxManage setextradata VM_NAME "VBoxInternal/TM/WarpDrivePercentage" 200

for double speed of the guest clock.

GUI support currently not planned.

It does not make the time device to go faster.

Tested and works only for some aspects of every program, "perhaps" since it does not make the time device to go faster, and programs use it for part of their time synchronizations.

In other VM utilities:

Also, the opener of the above ticket mentioned:

bochs and DOSbox can speed up or slow down VM by emulating CPU and/or timer slower or faster than normal.

Small Boy
  • 266
0

Qemu may have a solution for you as well, see: https://stackoverflow.com/questions/24936920/increasing-the-speed-of-qemu-clock

Snippet:

qemu-system-x86_64 -rtc base=localtime,clock=vm -icount shift=7,align=off,sleep=off ...
CenterOrbit
  • 2,056