protected void Start(MediaTimerMode mode, int intervalMilliseconds) { CheckUp(intervalMilliseconds); if (mode == MediaTimerMode.OneShot) { _timerId = timeSetEvent(intervalMilliseconds, _caps.PeriodMin, _oneShotCallback, 0, (int)mode); } else { _timerId = timeSetEvent(intervalMilliseconds, _caps.PeriodMin, _periodicCallback, 0, (int)mode); } if (_timerId == 0) { throw new Exception(Strings.UnableStartMediaTimer); } }
public MediaTimer(MediaTimerMode mode, int intervalMilliseconds) { this.Mode = mode; this.IntervalMilliseconds = intervalMilliseconds; }