I am trying to configure the absolute time in my application, which at some point receives the time_t
epoch value from an external source and should update it internally so that at any time I can retrieve the actual epoch to use in my application. I have tried to update the epoch using the function
and then read it through the function time(NULL)
, but the latter always returns the value -1
. Does anyone have any suggestions for implementing what I want?