$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Yuriy Koblents-Mishke (yurakm_at_[hidden])
Date: 2007-05-06 20:23:55
On 5/1/07, Philippe Vaucher <philippe.vaucher_at_[hidden]> wrote:
>
> >
> > The reason is simple: clock() times CPU time. usleep() sleeps - it
> > doesn't use the CPU. Thus, no "time" elapses during the sleep.
>
> Makes sense, but on windows it works even when I Sleep() so it confused me
> a
> bit.
> [snip]
Standard clock() measures CPU time, while Windows / MS DOS clock() measures
elapsed time. Most of us could use the old boost timer otherwise.
Moreover, Windows 95/98/ME did not provide alternative API to measure CPU
time. NT based Windows became dominant only recently; otherwise the problem
would be fixed long ago.