VirtualBox

Ignore:
Timestamp:
Jun 22, 2021 9:01:04 AM (3 years ago)
Author:
vboxsync
Message:

Runtime: Make use of CreateWaitableTimerEx and CREATE_WAITABLE_TIMER_HIGH_RESOLUTION available on newer Windwos 10 release to improve timer accuracy for sub tick intervals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/init-win.cpp

    r85124 r89827  
    7777/** SystemTimeToTzSpecificLocalTime. */
    7878DECL_HIDDEN_DATA(decltype(SystemTimeToTzSpecificLocalTime) *) g_pfnSystemTimeToTzSpecificLocalTime = NULL;
     79/** CreateWaitableTimerEx . */
     80DECL_HIDDEN_DATA(PFNCREATEWAITABLETIMEREX)      g_pfnCreateWaitableTimerExW = NULL;
    7981
    8082/** The native ntdll.dll handle. */
     
    513515        g_pfnGetSystemWindowsDirectoryW = (PFNGETWINSYSDIR)GetProcAddress(g_hModKernel32, "GetWindowsDirectoryW");
    514516    g_pfnSystemTimeToTzSpecificLocalTime = (decltype(SystemTimeToTzSpecificLocalTime) *)GetProcAddress(g_hModKernel32, "SystemTimeToTzSpecificLocalTime");
     517    g_pfnCreateWaitableTimerExW = (PFNCREATEWAITABLETIMEREX)GetProcAddress(g_hModKernel32, "CreateWaitableTimerExW");
    515518
    516519    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette