2 Copyright © 2003, The AROS Development Team. All rights reserved.
8 /*** Main *******************************************************************/
11 struct timeval tv_start
,
15 Object
*object
= NULL
;
18 if (!Test_Initialize()) goto error
;
20 gettimeofday(&tv_start
, NULL
);
22 for(i
= 0; i
< count
; i
++)
24 object
= TestObject
, End
;
25 DisposeObject(object
);
28 gettimeofday(&tv_end
, NULL
);
30 elapsed
= ((double)(((tv_end
.tv_sec
* 1000000) + tv_end
.tv_usec
)
31 - ((tv_start
.tv_sec
* 1000000) + tv_start
.tv_usec
)))/1000000.;
35 "Elapsed time: %f seconds\n"
36 "Number of objects: %d\n"
37 "Objects per second: %f\n"
38 "Seconds per object: %f\n",
39 elapsed
, count
, (double) count
/ elapsed
, (double) elapsed
/ count
47 printf("Could not initialize Test class!\n");