From: Glynn Clements <glynn.clements@virgin.net>
To: Mehran Rezaei <mehran@cs.unt.edu>
Cc: C news group <linux-c-programming@vger.kernel.org>,
gcc news group <linux-gcc@vger.kernel.org>
Subject: Re: timing
Date: Wed, 1 May 2002 19:20:30 +0100 [thread overview]
Message-ID: <aapbr7$kvf$2@main.gmane.org> (raw)
In-Reply-To: <3CCFD6BA.1D667C11@cs.unt.edu>
Mehran Rezaei wrote:
> For the sake of performance analysis of some programs, I am using
> clock() function call. I am running the programs on a linux box (Redhat
> 7.2, and my machine is i686).
> However, I am not getting the correct results as I expected. Perhaps I
> miss something necessary for using timing function calls.
[snip]
> To my understanding both printfs should at least show 10 seconds
> (because of "sleep(10)"). But they do not.
clock() reports the amount of CPU time used by the program. sleep()
will use negligible CPU time (probably too small to measure).
--
Glynn Clements <glynn.clements@virgin.net>
next prev parent reply other threads:[~2002-05-01 18:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-01 11:51 timing Mehran Rezaei
2002-05-01 18:20 ` timing Glynn Clements
2002-05-01 18:20 ` Glynn Clements [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-30 20:19 Timing Murray Rhonda
2007-03-01 17:03 Timing Mika Hall
2002-05-01 11:51 timing Mehran Rezaei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='aapbr7$kvf$2@main.gmane.org' \
--to=glynn.clements@virgin.net \
--cc=linux-c-programming@vger.kernel.org \
--cc=linux-gcc@vger.kernel.org \
--cc=mehran@cs.unt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.