Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • VLC VLC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,714
    • Issues 3,714
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 231
    • Merge requests 231
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLANVideoLAN
  • VLCVLC
  • Merge requests
  • !2190

win32: timer: use threadpoolapiset.h

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Thomas Guillem requested to merge tguillem/vlc:win32-timer into master Jul 07, 2022
  • Overview 19
  • Commits 1
  • Pipelines 8
  • Changes 1

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 relative time in SetThreadpoolTimer() and vlc_timer absolute times are substracted with vlc_tick_now().

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: win32-timer

VideoLAN code repository instance