private void Pause(AniDBPause pauseType) { int pauseDuration = AniDBDelay; if (pauseType == AniDBPause.Short) { pauseDuration = AniDBDelay_Short; } if (ExtendPauseSecs.HasValue) { pauseDuration = ExtendPauseSecs.Value * 1000; } // do not send more than one message every 2 (2.4 to make sure) seconds while (DateTime.Now < JMMService.LastAniDBMessage.AddMilliseconds(pauseDuration)) { // pretend to do something.... Thread.Sleep(200); } ResetExtendPause(); }
private void Pause(AniDBPause pauseType) { int pauseDuration = AniDBDelay; if (pauseType == AniDBPause.Short) pauseDuration = AniDBDelay_Short; if (ExtendPauseSecs.HasValue) pauseDuration = ExtendPauseSecs.Value * 1000; // do not send more than one message every 2 (2.4 to make sure) seconds while (DateTime.Now < JMMService.LastAniDBMessage.AddMilliseconds(pauseDuration)) { // pretend to do something.... Thread.Sleep(200); } ResetExtendPause(); }