Boost logo

Boost Users :

Subject: Re: [Boost-users] Threads example question
From: Anders Wallin (anders.e.e.wallin_at_[hidden])
Date: 2009-06-24 16:04:30


>
> > What am I doing wrong?
>
> boost::timer doesn't tell you the elapsed wall-time necessarily. On linux,
> it
> gives elapsed cpu time (which adds together the processing time used by all
> processors).

Thanks, this is it.
I tried clock() from time.h and it works similarly to timer.
time() from time.h seems to give me wall-time, but only with 1s resolution.
here: http://pastebin.ca/1473138

With four calls to the same function, I'm now getting the speedup I was
expecting:
1cpu 18s
2cpus 9s
3cpus 9s
4cpus 5s

AW



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