From 220acccd5855ff46166839b9014aca66550f23d5 Mon Sep 17 00:00:00 2001 From: Michael Gary Date: Wed, 24 Jul 2002 19:49:27 +0000 Subject: [PATCH] Added a test for time reporting. svn path=/trunk/boinc/; revision=248 --- apps/uc_slow.C | 9 ++++++++- checkin_notes | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/uc_slow.C b/apps/uc_slow.C index 6a916c8e71..ddc5f29298 100644 --- a/apps/uc_slow.C +++ b/apps/uc_slow.C @@ -56,7 +56,7 @@ int do_checkpoint(MFILE& mf, int nchars) { int main() { int c, nchars = 0, retval, n; char resolved_name[512]; - MFILE out; + MFILE out, time_file; FILE* state, *in; APP_IN ai; APP_OUT ao; @@ -82,6 +82,7 @@ int main() { fprintf(stderr, "APP: uc_slow output open failed %d\n", retval); exit(1); } + time_file.open("../../time.xml", "w"); while (1) { c = fgetc(in); if (c == EOF) break; @@ -112,4 +113,10 @@ int main() { exit(1); } fprintf(stderr, "APP: uc_slow ending, wrote %d chars\n", nchars); + ao.percent_done = 1; + app_completed(ao); + time_file.printf("%f\n", ao.cpu_time_at_checkpoint); + time_file.flush(); + time_file.close(); + return 0; } diff --git a/checkin_notes b/checkin_notes index aaa27a3c8e..15d4365071 100755 --- a/checkin_notes +++ b/checkin_notes @@ -1260,3 +1260,12 @@ Michael Gary 7/23/2002 test_sticky.php (added) uc_wu_sticky (added) uc_result_sticky (added) + +Michael Gary 7/24/2002 + - Added a test for the time reporting system. + test/ + test_time.php (added) + init.inc + apps/ + uc_slow.C +