Skip to content
Snippets Groups Projects
  1. Jul 14, 2022
  2. Jul 13, 2022
    • Steve Lhomme's avatar
      79720f46
    • Thomas Guillem's avatar
      win32: timer: use threadpoolapiset.h · 9fdd9fb1
      Thomas Guillem authored
      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.
      9fdd9fb1
  3. Jul 12, 2022
Loading