Skip navigation.
Home
The QNX Community Portal

View topic - How to get clock time in seconds since 1987

How to get clock time in seconds since 1987

Read-only archive of qnx.qnx4 (General QNX4 Discussion Group) at inn.qnx.com

How to get clock time in seconds since 1987

Postby radha » Tue Apr 18, 2006 9:49 am

How do we get time in seconds between 1970 and 1980?

Thanks
Radha
radha
Active Member
 
Posts: 36
Joined: Mon Jan 19, 2004 1:09 pm

Re: How to get clock time in seconds since 1987

Postby booBot » Tue Apr 18, 2006 11:25 am

On Tue, 18 Apr 2006 13:49:26 +0400, radha krishnan
<radha.nk@geind.ge.com> wrote:
How do we get time in seconds between 1970 and 1980?
Use difftime().


Tony.
booBot
Senior Member
 
Posts: 633
Joined: Tue Feb 24, 2004 5:07 pm

Re: How to get clock time in seconds since 1987

Postby John Garvey » Tue Apr 18, 2006 3:38 pm

radha krishnan wrote:
How do we get time in seconds between 1970 and 1980?

Are you thinking of converting between DOS/QNX time epochs?;
I think it was 315532800.
John Garvey
 

re:How to get clock time in seconds since 1987

Postby krishnanraman » Wed Aug 16, 2006 3:28 am

difftime() will give the diference between two dates in seconds. You can use the same function and pass two dates to get the time. You can use &now if you want the current date/time.

These functions should be in time.h header file.
I think its about, 347068800
Regards,
Krishnan
krishnanraman
New Member
 
Posts: 5
Joined: Mon Aug 14, 2006 5:29 am


Return to qnx.qnx4

Who is online

Users browsing this forum: No registered users and 3 guests

cron