fix missing return, tweaked attachtest to show suspend/resume speed in a sensible manner

develop
Petr Mrázek 2009-11-19 00:36:03 +00:00
parent 141f056350
commit 67adb64a46
2 changed files with 4 additions and 2 deletions

@ -983,6 +983,7 @@ int32_t API::ReadCreatureInBox(int32_t index, t_creature & furball,
}
index++;
}
return -1;
}
bool API::ReadCreature(const int32_t &index, t_creature & furball)

@ -65,10 +65,11 @@ int main (void)
cout << "Testing suspend/resume" << endl;
DF.Attach();
time(&start);
for (int i = 0; i < 100; i++)
for (int i = 0; i < 1000000; i++)
{
DF.Suspend();
cout << "Try " << i << endl;
if(i%10000 == 0)
cout << i / 10000 << "%" << endl;
DF.Resume();
}
time(&end);