Skip to content

Commit

Permalink
Made loop sleep shorter, #1077
Browse files Browse the repository at this point in the history
  • Loading branch information
John Simons committed Apr 19, 2013
1 parent f0cbdab commit 2d816ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public TimeoutPersisterReceiver(IManageTimeouts timeoutsManager)
{
timeoutsManager.TimeoutPushed += TimeoutsManagerOnTimeoutPushed;

SecondsToSleepBetweenPolls = 5;
SecondsToSleepBetweenPolls = 1;

workerThread = new Thread(Poll) { IsBackground = true };
}
Expand Down Expand Up @@ -64,7 +64,7 @@ void Poll()
{
if (nextRetrieval > DateTime.UtcNow)
{
Thread.Sleep(TimeSpan.FromSeconds(Math.Min(Math.Max((nextRetrieval - DateTime.UtcNow).TotalSeconds, 0), SecondsToSleepBetweenPolls)));
Thread.Sleep(SecondsToSleepBetweenPolls*1000);
continue;
}

Expand Down

0 comments on commit 2d816ed

Please sign in to comment.