|
Boost Users : |
Subject: Re: [Boost-users] [timer] eclapsed return zero
From: raindog_at_[hidden]
Date: 2008-09-05 23:43:44
Perhaps your thread has been preempted during execution causing the delay.
------Original Message------
From: gmail
Sender: boost-users-bounces_at_[hidden]
To: boost-user-list
ReplyTo: boost-users_at_[hidden]
Sent: Sep 5, 2008 4:15 AM
Subject: [Boost-users] [timer] eclapsed return zero
Hello, I have used the timer class in my application. It works ok sometime but i think it dont work correctly.
my code is:
#include <iostream>
#include "boost/timer.hpp"
using namespace std;
using namespace boost;
int main()
{
int count=0;
timer t;
for(;count<1000000;++count);
cout<<t.elapsed();
return 0;
}
and the output:
0.015
execute time :0.062s
sometime the output is:
0
execute time :0.015s
regards
hechao
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Sent from my Verizon Wireless BlackBerry
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