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

◆ bt_mesh_time_srv_status()

int bt_mesh_time_srv_status ( struct bt_mesh_time_srv srv,
uint64_t  uptime,
struct bt_mesh_time_status status 
)

#include <include/bluetooth/mesh/time_srv.h>

Get the time status at a given uptime.

Converts the device uptime (from k_uptime_get) to TAI time.

Note
This function does not support status lookups for uptimes that occurred before the last received set- or status update. In addition, lookups for uptimes that happened before k_uptime_get must be used with caution, since there is no guarantee that the output data is fully reliable.
Parameters
[in]srvTime Server instance.
[in]uptimeUptime at the desired point in time.
[out]statusThe device's Time Status at the given uptime.
Return values
0Successfully retrieved the Time status.
-EAGAINInvalid uptime input. Asking for status that is in the past.