linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kaushal <kaushal@rocsys.com>
To: fabio <fabio@crearium.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: displaying time_t values
Date: Mon, 24 Oct 2005 12:36:54 +0530	[thread overview]
Message-ID: <1130137614.3683.24.camel@kaushal> (raw)
In-Reply-To: <435ACAD8.8090909@crearium.com>


In case u find the function is over in shorer time,simply run the same
function in a loop for n times and later divide the total time by n.Hope
that was useful.
On Sat, 2005-10-22 at 17:27 -0600, fabio wrote:
> hello,
> 
> I would like to know how to display the full seconds and miliseconds 
> transacurrent since 2 points in a program.
> 
> main()
> {
>     time_t t1_t2;
>     (void)time(&t1);
>     cpu_intensive_function();
>     (void)time(&t2);
>     printf("the full time spent in the process is:");
>     // how should i display it ? ej: 51,56745 seconds ot 1024,04546 seconds
> 
> }
> 
> Thanks,
> 
> fabolo
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2005-10-24  7:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-22 23:27 displaying time_t values fabio
2005-10-23 10:07 ` Michael Iatrou
2005-10-24  7:06 ` kaushal [this message]
2005-10-24 11:11 ` Glynn Clements

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=1130137614.3683.24.camel@kaushal \
    --to=kaushal@rocsys.com \
    --cc=fabio@crearium.com \
    --cc=linux-c-programming@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).