From: Suciu Flavius <suciuflavius@tiscali.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: Unix Time
Date: Sun, 26 Sep 2004 20:01:04 -0700 [thread overview]
Message-ID: <cj6vk0$c3i$1@sea.gmane.org> (raw)
In-Reply-To: <20040926140210.43741.qmail@web52903.mail.yahoo.com>
struct timeval start,stop;
int elapsed;
gettimeofday(&start,NULL);
computeWhatIWant();
gettimeofday(&stop,NULL);
elapsed=(stop.tv_sec-start.tv_sec)*1000000+(stop.tv_usec-start.tv_usec);
printf("sprintf: elapsed=%5d miliseconds\n",elapsed);
Ankit Jain wrote:
> well i dont know hot to interpret unix time
>
> gettimeofday returns time in unix format
>
> if i am want to subtract one time from another how to
> do that?
>
> thanks
>
> ankit
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
> -
> 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
>
next prev parent reply other threads:[~2004-09-27 3:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-26 14:02 Unix Time Ankit Jain
2004-09-27 3:01 ` Suciu Flavius [this message]
2004-09-26 22:57 ` Jon Masters
2004-09-27 5:10 ` Ankit Jain
2004-09-27 10:59 ` szonyi calin
2004-09-27 11:57 ` Jon Masters
2004-09-27 21:33 ` Sumit Narayan
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='cj6vk0$c3i$1@sea.gmane.org' \
--to=suciuflavius@tiscali.de \
--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).