CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RTCC counts seconds only

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lindermat



Joined: 21 Nov 2011
Posts: 11

View user's profile Send private message

RTCC counts seconds only
PostPosted: Wed Jan 11, 2012 3:29 pm     Reply with quote

Is there anyway to get the RTCC to count in seconds only? I need to calculate elapsed time and total times, and adding seconds and rolling over to minutes is a PITA.

A 32 bit variable can count seconds for 136 years before it rolls over. It's easier to just add and subtract then do the conversion at the output for human consumption.

Are there elapsed time calculation functions that work with hours, minutes and seconds?

Thanks!
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jan 11, 2012 4:18 pm     Reply with quote

There's a nice 'software RTC' in the code library here...you might want to look at it.
I know it does work !
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Jan 11, 2012 5:03 pm     Reply with quote

... and the Code Library also contains a library of date time routines: http://www.ccsinfo.com/forum/viewtopic.php?t=25611
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group