Atlas-C++
|
00001 #include <time.h> 00002 00003 clock_t calc_time0,calc_time1; 00004 double calc_time; 00005 #define TIME_ON calc_time0=clock(); 00006 #define TIME_OFF(msg) calc_time1=clock(); \ 00007 calc_time=(double)(calc_time1-calc_time0)/CLOCKS_PER_SEC; \ 00008 std::cout<<msg<<": iterations="<<i \ 00009 <<" CPU Time="<<calc_time \ 00010 <<" iter/s="<<i/calc_time<<std::endl; 00011
Copyright 2000-2004 the respective authors.
This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.