|
Boost Users : |
From: Simon Pickles (sipickles_at_[hidden])
Date: 2007-12-11 08:39:05
Hello,
Using gcc on ubuntu, can anyone tell my why this simple code:
/////////////////////////////////////////////////
#include <iostream>
using namespace std;
#include "boost/timer.hpp"
#include <time.h>
int main()
{
clock_t t = clock();
boost::timer bt;
cout << t << " : " << bt.elapsed() << endl;
sleep(10);
t = clock();
cout << t << " : " << bt.elapsed() << endl;
sleep(10);
t = clock();
cout << t << " : " << bt.elapsed() << endl;
return 0;
}
////////////////////////////////////////////////////////////////
produces output like this:
0 : 0
0 : 0
0 : 0
Its not cout, since pausing the program shows the values to be 0 in the
watch window.
Many thanks
Simon
-- Linux Counter: User# 424693
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net