Part Number:CC2640R2F
Tool/software:TI-RTOS
Hi,all
I want to use 64-bits time in cc2640r2f with TI-RTOS .
The purpose is that I need to deal with the time after 2038-12-31 23:59:59.
I have simply added the "_DLIB_TIME_USES_64" and "_DLIB_TIME_ALLOW_64" definition to pre-processor in IDE (IAR for arm 8.22.2).
Then I built the project,it generated one error when doing post building action .
The xdc clock module is used.
I know the size of the seconds of "Seconds_set(UInt32 seconds);" is 32-bits.So I couldn't do any any changes to the xdc clock module.
So I use the clock module just as a timer-tick.,and add time offset (not from 1970) outside of seconds module.
Here is what I want to do:
Seconds_set(0);
t=time(NULL);
t+=(1514736000);// time start from 2018/1/1 0:0:0
ctime(&t);....
.....
If the time_t is 64-bits, it can work fine.
If the time_t is 32-bits, it will overflow after 2038.