$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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