On Tue, 19 Jun 2007 07:18:27 -0700, Stu wrote:
Quote:
Hi guys,
>
I've been having trouble getting the clock function to work portably,
please could I get some thoughts?
>
<Possibly OT comments>
It works fine on my laptop (under WinXP) and on my office computer
(under Linux), but I have to write some code for the system simulator
for the Cell BE processor (the thing inside the PS3), which is
apparently a PPC architecture, and I can't get the clock function to
return anything sensible - it returns 0 every time for no apparent
reason.
</Possibly OT comments>
>
The following is a cut-down version of my code which exhibits the
problem I'm having :) Any thoughts please? As far as I know the clock
function specification says something like "give the best result you
can", but surely "return 0;" wasn't what was in mind...?
Maybe not... OTOH it doesn't violate the standard. You'd probably be best
off asking on a forum for your platform.
--
Lionel B