2009/9/24 fmingu <fmingu@163.com>
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?

You didn't specify which operating system you are using, but I if it's not a real time OS, there is no guarantee that the same code will take the same time to execute on each run.  For small programs (in terms of run time) the difference can be huge (easily an order of magnitude).

Roman Perepelitsa.