From 67adb64a46ede2d267795ada0721cc91f311baf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 19 Nov 2009 00:36:03 +0000 Subject: [PATCH] fix missing return, tweaked attachtest to show suspend/resume speed in a sensible manner --- library/DFHackAPI.cpp | 1 + tools/attachtest.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/DFHackAPI.cpp b/library/DFHackAPI.cpp index b18d5d8a7..6904739c2 100644 --- a/library/DFHackAPI.cpp +++ b/library/DFHackAPI.cpp @@ -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) diff --git a/tools/attachtest.cpp b/tools/attachtest.cpp index e168b9c51..687d8593e 100644 --- a/tools/attachtest.cpp +++ b/tools/attachtest.cpp @@ -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);