I have recently changed my compiler to the xc16 gcc compiler. This new compiler does not have the preprocessor macro __TIME__
defined.
All the research I have done leads me to explanations on how to use __TIME__
and that it's required by the standard, but nothing about how it works.
Currently, I use __TIME__
and __DATE__
to create a stamp on compile time. This is checked periodically and if it is older than the stamp on the software on the server, then the server downloads the new software to the device. Without __TIME__
I cannot implement our auto update system.
I imagine I would need something along the lines of #define TIME FunctionToGetCurrentTime
but I am having no luck using time_t now = time(0);
– clearly I was wrong, as this is the first time I've tried to write a preprocessor macro. I have only used #define
for values.