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:
Ali Saidi 2005-11-02 14:45:35 -05:00
parent 15ccd16fd8
commit 0b3c27f149

View file

@ -61,6 +61,7 @@ namespace Stats {
Time statTime(true);
Tick startTick;
Tick lastDump(0);
class SimTicksReset : public Callback
{
@ -194,6 +195,11 @@ list<Output *> OutputList;
void
DumpNow()
{
assert(lastDump <= curTick);
if (lastDump == curTick)
return;
lastDump = curTick;
list<Output *>::iterator i = OutputList.begin();
list<Output *>::iterator end = OutputList.end();
for (; i != end; ++i) {