id summary reporter owner description type status component version resolution keywords cc guest host 7609 Windows XP Guest - timeBeginPeriod( ) slows system clock ewopost@bellsouth.net "A system service running in a Windows XP SP3 Guest can use the Windows ""timeBeginPeriod( )"" function to change the system time tick resolution. That is common with multimedia or real-time applications. I have such a system service. After the service has changed the Windows XP Guest timer resolution a problem occurs when running on a Windows 7 Host. The system time in the Guest updates at a much slower rate than normal and the time in the Guest falls behind the correct time. Any time related events occur at a slower than normal rate. For example, desktop fade effects, animated mouse pointers, Task Manager refreshing, and multimedia applications all appear to be ""slow"" due to the system time updating at a slower rate. When the Windows time resolution is set back to the default by the system service then the time behaves normally again. If the Windows clock is reset to the correct time then it remains correct. The service changes the time using this code. {{{ TIMECAPS tc; /* Get time capabilities of system */ if (timeGetDevCaps(&tc, sizeof(TIMECAPS)) != TIMERR_NOERROR) { Critical( ); } /* Set the highest possible timer resolution (1 ms. if possible) */ gwTimerRes = min(max(tc.wPeriodMin, 1), tc.wPeriodMax); if ( timeBeginPeriod(gwTimerRes) != TIMERR_NOERROR ) { Critical( ); } }}} When the service is stopped it sets the time resolution back to normal. {{{ /* Set the timer resolution back to normal */ if ( timeEndPeriod(gwTimerRes) != TIMERR_NOERROR ) {} }}} Other than the system time and timers being ""slow"" there are no other apparent problems in the Guest OS. I did not see excessive CPU usage, I/O or Interrupt activity. Although many things appear ""slow"" due to the incorrect time updates the execution of CPU instructions in the Guest does not seem to be affected. I verified that the ""timeBeginPeriod( )"" Windows function causes the problem to occur and that the problem stops after calling ""timeEndPeriod( )"". This problem might explain some of the ""Slow Windows Guest"" complaints that are unresolved. The curious thing about the problem is that it does not appear to happen with Linux Host OS. I have also tested the system service on a number of real PCs in order to verify that the problem is not the system service. After only seeing the problem in a VirtualBox guest I decided to investigate the problem further. I removed code from the system service until I found the functions causing the problem. The problem also occurs with version 3.2.8 of VirtualBox under the same conditions. The problem occurs with or without the Guest Additions installed." defect closed other VirtualBox 3.2.10 obsolete Windows Windows