Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Time difference

0 views
Skip to first unread message

deepak

unread,
Jul 2, 2009, 1:26:59 AM7/2/09
to
Hi,

Anyone have a program to find the time difference in C?

Thanks,
Deepak.

user923005

unread,
Jul 2, 2009, 1:34:41 AM7/2/09
to
On Jul 1, 10:26 pm, deepak <deepakpj...@gmail.com> wrote:
> Hi,
>
> Anyone have a program to find the time difference in C?

Examine difftime() as defined in time.h

Jack Klein

unread,
Jul 2, 2009, 9:54:50 PM7/2/09
to
On Wed, 1 Jul 2009 22:26:59 -0700 (PDT), deepak
<deepa...@gmail.com> wrote in comp.lang.c:

#include <stdio.h>

int main(void)
{
printf("The time difference between now and now is...\n\n\n\n"
"Exactly 0.000 seconds !!!\n");
return 0;
}

If that doesn't answer your question, you need to work on answering it
better.

Did you mean the time difference between orange and green?

The time difference between grass and asphalt?

You probably get the idea.

--
Jack Klein http://JK-Technology.Com
FAQs for
news:comp.lang.c http://c-faq.com/
news:comp.lang.c++ http://www.parashift.com/c++-faq-lite/
news:alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

Mark McIntyre

unread,
Jul 5, 2009, 9:03:28 AM7/5/09
to
Jack Klein wrote:
> On Wed, 1 Jul 2009 22:26:59 -0700 (PDT), deepak
> <deepa...@gmail.com> wrote in comp.lang.c:
>
>> Hi,
>>
>> Anyone have a program to find the time difference in C?
>>
>
> Did you mean the time difference between orange and green?
>
> The time difference between grass and asphalt?
>
> You probably get the idea.

While pondering on this, the OP might want to read his compiler's notes
or manpage on the content of time.h

--
Mark McIntyre

CLC FAQ <http://c-faq.com/>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

0 new messages