nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ date_time_uptime_to_unix_time_ms()

int date_time_uptime_to_unix_time_ms ( int64_t * uptime)

#include <include/date_time.h>

Get the date time UTC when the passing variable uptime was set. This function requires that k_uptime_get() has been called on the passing variable uptime prior to the function call. In that case the uptime will not be too large or negative.

Note
If the function fails, the passed in variable retains its old value.
Parameters
[in,out]uptimePointer to a previously set uptime.
Returns
0 If the operation was successful.
-ENODATA If the library does not have a valid date time UTC.
-EINVAL If the passed in pointer is NULL, dereferenced value is too large, already converted or if uptime is negative.