win32: timer: use threadpoolapiset.h
New API: https://docs.microsoft.com/en-us/windows/win32/procthread/thread-pool-api This avoid one allocation (that can fail) in vlc_timer_schedule() (that was handled with a call to abort()). One remark from the documentation: "If the due time specified by pftDueTime is relative, the time that the system spends in sleep or hibernation does not count toward the expiration of the timer. The timer is signaled when the cumulative amount of elapsed time the system spends in the waking state equals the timer's relative due time or period. If the due time specified by pftDueTime is absolute, the time that the system spends in sleep or hibernation does count toward the expiration of the timer. If the timer expires while the system is sleeping, the timer is signaled immediately when the system wakes." For that reason, the vlc_timer API always use a absolute FILETIME in SetThreadpoolTimer(). vlc_timer absolute ticks are substracted with vlc_tick_now() and added to the absolute FILETIME.
parent
e1278328
No related branches found
No related tags found
Please register or sign in to comment