2 Copyright © 2003, The AROS Development Team. All rights reserved.
8 /*** Main *******************************************************************/
11 struct timeval tv_start
,
13 int count
= 100000000;
15 Object
*object
= NULL
;
18 if (!Test_Initialize()) goto error
;
20 object
= TestObject
, End
;
22 gettimeofday(&tv_start
, NULL
);
24 for(i
= 0; i
< count
; i
++)
26 DoMethod(object
, MUIM_Test_Dummy
);
29 gettimeofday(&tv_end
, NULL
);
31 DisposeObject(object
);
33 elapsed
= ((double)(((tv_end
.tv_sec
* 1000000) + tv_end
.tv_usec
)
34 - ((tv_start
.tv_sec
* 1000000) + tv_start
.tv_usec
)))/1000000.;
38 "Elapsed time: %f seconds\n"
39 "Number of calls: %d\n"
40 "Calls per second: %f\n"
41 "Seconds per call: %f\n",
42 elapsed
, count
, (double) count
/ elapsed
, (double) elapsed
/ count
50 printf("Could not initialize Test class!\n");