Fix bug where simulation terminates same cycle as last stat dump causing a duplicate row in db
--HG-- extra : convert_revision : 45877c6feeaddf921eb0f4764246bf66e1705a1d
This commit is contained in:
parent
15ccd16fd8
commit
0b3c27f149
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,7 @@ namespace Stats {
|
||||||
|
|
||||||
Time statTime(true);
|
Time statTime(true);
|
||||||
Tick startTick;
|
Tick startTick;
|
||||||
|
Tick lastDump(0);
|
||||||
|
|
||||||
class SimTicksReset : public Callback
|
class SimTicksReset : public Callback
|
||||||
{
|
{
|
||||||
|
@ -194,6 +195,11 @@ list<Output *> OutputList;
|
||||||
void
|
void
|
||||||
DumpNow()
|
DumpNow()
|
||||||
{
|
{
|
||||||
|
assert(lastDump <= curTick);
|
||||||
|
if (lastDump == curTick)
|
||||||
|
return;
|
||||||
|
lastDump = curTick;
|
||||||
|
|
||||||
list<Output *>::iterator i = OutputList.begin();
|
list<Output *>::iterator i = OutputList.begin();
|
||||||
list<Output *>::iterator end = OutputList.end();
|
list<Output *>::iterator end = OutputList.end();
|
||||||
for (; i != end; ++i) {
|
for (; i != end; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue