示例#1
0
        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();
        }
示例#2
0
		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();
		}