9/29/2009

timer in c++

include ctime, iostream, iomanip
using namespace std;
int main()
{

time_t tstart, tend;

tstart = time(0);
//your scripts
//
//end
tend = time(0);
then output the result of difftime(tend, tstart)

}


* the colored lines means it is not the standard c++ format because of the editor of the google blog

没有评论: