TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: Bill Birrell
date: 2004-04-17 02:37:00
subject: Squares

Hi Jasen,

 > using times() would be more apropriate than clock() in
 > environemnts that
 > support it. Also clock() doesn't count time spent in
 > child processes in
 > some environments (like linux...)

    I gave up recommending the use of functions that are not in the
standard libraries, or covered in the ISO standard for the the C language
because people gave me such a hard time about them.  7.23.2.1 says no such
thing about clock(). It returns the implementation's best approximation is
what it says. If that's not good enough, c'est la vie.

    times() may be useful, but it is not ANSI standard.

    Of course there is the same problem with the spawn() or fork() or
exec() siblings which are no longer standard, but system() or assembler is
all that is left when these methods are excluded, and system() is
absolutely implementation dependent so it does not in fact have to return
from the calling process at all, and is therefore quite useless for the
purpose.

Best Wishes,
Bill.

---
* Origin: Escan BBS (2:25/200)
SEEN-BY: 633/267 270
@PATH: 25/200 108 252/110 250/501 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.