This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Number of seconds between two times


Number of seconds between two times

Postby Pam » Jul 17, 2002 @ 4:05pm

All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


Postby Michael Y » Jul 17, 2002 @ 4:21pm

User avatar
Michael Y
pm Insider
 
Posts: 1956
Joined: Feb 24, 2002 @ 2:27am


Postby britcode » Jul 17, 2002 @ 5:02pm

UNIX has a system when all times are espressed in seconds since some special date in 1970, and I think you can get this is Windows as well.
Possibly by calling time() or another ANSI function?

Obviously in this case this system is easier to work with than a function which returns hours and seconds and stuff.

...though it does run out in 2037 or something (when all UNIX machines will die!)

update - just checked eVC, and there's no time function I must be thinking of Gnu GCC.
Oh well - I guess they stripped out all the UNIX stuff in Windows CE - makes sense.
Last edited by britcode on Jul 17, 2002 @ 5:07pm, edited 1 time in total.
britcode
 


Postby Pam » Jul 17, 2002 @ 5:02pm

Michael, the problem is how you get to time1 and time2 if they are spread apart by years. If it's time within one day, it's pretty easy to add the hours minutes seconds together. But over years or decades it's much more difficult to figure out.

Pam
All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


Postby Digby » Jul 17, 2002 @ 6:08pm

It comes down to computing which year is a leap year (contains 366 days vs. 365). You already know how many days are in each month, and how many seconds are in a day. Do the math sistah!
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby Pam » Jul 17, 2002 @ 6:17pm

All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


Postby refractor » Jul 17, 2002 @ 10:07pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby BadBazza » Jul 18, 2002 @ 1:10am

Lost....... Assumed Coding!
User avatar
BadBazza
pm Insider
 
Posts: 81
Joined: Sep 21, 2001 @ 6:26am
Location: Blackpool, UK


Postby Dan East » Jul 18, 2002 @ 3:27am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Dan East » Jul 18, 2002 @ 3:40am

Last edited by Dan East on Jul 18, 2002 @ 3:59pm, edited 1 time in total.
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby BadBazza » Jul 18, 2002 @ 12:26pm

Lost....... Assumed Coding!
User avatar
BadBazza
pm Insider
 
Posts: 81
Joined: Sep 21, 2001 @ 6:26am
Location: Blackpool, UK


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron