Class HighResolutionTimer
This class implements a high resolution periodic timer for generating media samples. It provides a timer that uses a dedicated thread and is capable of providing timed events with a maximum jitter of less than a millisecond and an average jitter of less that 0.1 milliseconds. An instance of this class may be used for multiple media sources.
Inherited Members
Namespace: SipLib.Media
Assembly: SipLib.dll
Syntax
public class HighResolutionTimer
Constructors
| Edit this page View SourceHighResolutionTimer(double)
Constructor.
Declaration
public HighResolutionTimer(double timerPeriodMs)
Parameters
Type | Name | Description |
---|---|---|
double | timerPeriodMs | Timer period in milliseconds. Typically 20 ms for audio sources and 33.3 milliseconds for video sources. |
Methods
| Edit this page View SourceStart()
Starts the timer.
Declaration
public void Start()
Stop()
Stops the timer. Do not call Start() after Stop() is called.
Declaration
public void Stop()
Events
| Edit this page View SourceTimerExpired
Event that is fired when the timer expires.
Declaration
public event HighResolutionTimerDelegate? TimerExpired
Event Type
Type | Description |
---|---|
HighResolutionTimerDelegate |