TimerManager generate double tick per second on some situations
Bug #713742 reported by
Alexey Solomin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Code to fix this error quote below:
int TimerManager::run()
{
int nextMin = 0;
ptime now = microsec_
ptime nextSecond = now + seconds(1);
while (!mtx.timed_
{
const uint64_t t = getTick();
now = microsec_
nextSecond += seconds(1);
if (nextSecond < now)
{
nextSecond = now + seconds(1); // [!] IRainman fix TimerManager error: two tick generated in one second.
}
fire(
if (nextMin++ >= 60)
{
fire(
nextMin = 0;
}
}
dcdebug(
return 0;
}
autor FlylinkDC++ Team http://
Changed in dcplusplus: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: core |
To post a comment you must log in.
Error in TimerManager. In some situations, it may lead to incorrect operation of speed measuring devices, deadlock, division by zero, and other troubles
ps: ADCH + + probably also contains the error, please fix it ;)