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

Save Time of compiling

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



Joined: 02 Jul 2008
Posts: 27

View user's profile Send private message

Save Time of compiling
PostPosted: Thu Aug 28, 2008 8:31 am     Reply with quote

Hi!

Is it possible to save the time and date when a project was compiled somewhere in code?
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Thu Aug 28, 2008 8:34 am     Reply with quote

I do this

printf("\r\nV1.0\r\n%s %s\r\n\r\n", __DATE__, __TIME__);

this replaces __DATE__ and __TIME__ with the date and time at compile time.
What you do with it is up to you.
My code will always show the same date and time it was compiled at.
wewa



Joined: 02 Jul 2008
Posts: 27

View user's profile Send private message

PostPosted: Fri Aug 29, 2008 12:39 am     Reply with quote

Thanks for your help.

Problem solved in a simple way!
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