Opened 6 years ago
Last modified 4 years ago
#17742 closed defect
UEFI BootServices SetTimer Interfval calc off — at Initial Version
Reported by: | dfatvb | Owned by: | |
---|---|---|---|
Component: | VMM | Version: | VirtualBox 5.2.10 |
Keywords: | uefi settimer | Cc: | |
Guest type: | other | Host type: | Windows |
Description
Although the following should result in triggering the timer every 1ms, under virtual box it will not result in triggering the timer ever 1ms but instead every 10ms, So other code that waits for 1 second actually waits 10 seconds. Can you fix!! Thanks.
#define FREQIN100NS 10000 Frequency to request: 100ns * 10000 == 1ms
these convert our settimer frequency above to frequency per second these don't need to be modified on frequency changed. #define NUM100NSIN1SEC (1000000000/100) #define FREQINSECONDS (NUM100NSIN1SEC/FREQIN100NS)
if (!EFI_ERROR(status=UEFI_BS->CreateEvent(EVT_TIMER|EVT_NOTIFY_SIGNAL, TPL_CALLBACK, MyTimerNotifyCallback, NULL, &MyTimerEvent))) {
created event - now set timer for callback every 1 millisecond if (!EFI_ERROR(status=UEFI_BS->SetTimer(MyTimerEvent, TimerPeriodic, FREQIN100NS))) {