|
Boost Users : |
Subject: [Boost-users] A problem on using boost timer (different time intervals were showed). Can any one with kindness help me?
From: fmingu (fmingu_at_[hidden])
Date: 2009-09-24 00:23:34
I am using boost timer in C++ builder 2009 to test the time used in my program.there are the lines:
....................
boost::timer t;
double timeresult;
...................
t.restart();
........... //my program main body
timeresult=t.elapsed();
ShowMessage( " the time consumed by my program is "+FloatToStr(timeresult));
.........................
the program was compiled and linked and worked well.
But I find a problem:
every time the message showed is not the same time interval,
sometimes it is 0.015 and sometimes it is 0.016 and sometimes it is 0.
I do not know how it was happened.
Does it happen due to the multi-process and multi-thread mode by windows?
I do not know how to solve it. My program is quite strict on the time consumed by the computer.
Can any one with kindness help me?
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