Closed GoogleCodeExporter closed 9 years ago
Issue 19 has been merged into this issue.
Original comment by jsr%mala...@gtempaccount.com
on 14 Feb 2011 at 8:56
This issue is now fixed. I took a slightly different approach, merging the two
comparisons of DateTime.Now and _head.NextOccurence into one:
private void TimerCallbackHandler(object data)
{
var waitTime = _head.NextOccurence - DateTime.Now;
var waitMilliseconds = (long) waitTime.TotalMilliseconds;
if (waitMilliseconds > 0)
{
_timer.Change(waitMilliseconds, Timeout.Infinite);
return;
}
ThreadPool.QueueUserWorkItem(WaitCallbackHandler, _head);
_head.Advance();
_queue.Add(_head);
_head = _queue.DeleteMin();
TimerCallbackHandler(null);
}
A new build is on it's way up. Let me know if it causes any trouble.
Original comment by jsr%mala...@gtempaccount.com
on 14 Feb 2011 at 9:05
Original issue reported on code.google.com by
marcosou...@gmail.com
on 19 Jan 2011 at 1:49