TIME (Simple Network Time Protocol) service API.
More...
#include "settings/settings.h"
#include <datetime.h>
Go to the source code of this file.
|
|
#define | RECORD_TIME "time" |
| | Record name for Time service.
|
| |
|
|
typedef struct Time | Time |
| | Time service opaque type declaration.
|
| |
TIME (Simple Network Time Protocol) service API.
◆ time_get_local_time()
| LocalTime time_get_local_time |
( |
Time * | instance | ) |
|
Get date, time, and timezone offset in local timezone.
- Parameters
-
- Returns
- local DateTime
◆ time_get_settings()
Get the current time settings.
Retrieves the current configuration of the Time service including server address, timezone offset, sync interval, and enabled state.
- Parameters
-
| [in] | instance | pointer to the Time service instance |
| [out] | settings | pointer to a structure to be filled with current settings |
◆ time_get_settings_state()
| FuriState * time_get_settings_state |
( |
Time * | instance | ) |
|
Get FuriState holding TimeSettings.
- Parameters
-
◆ time_get_timestamp()
| time_t time_get_timestamp |
( |
void | | ) |
|
Get Unix seconds timestamp.
- Returns
- 64-bit Unix seconds timestamp
◆ time_get_timestamp_ms()
| time_t time_get_timestamp_ms |
( |
void | | ) |
|
Get Unix milliseconds timestamp.
- Returns
- 64-bit Unix milliseconds timestamp
◆ time_set_settings()
Set new time settings.
Updates the Time service configuration. Changes take effect immediately and will trigger a reconfiguration of the background synchronization task if the service is enabled.
- Parameters
-
| [in,out] | instance | pointer to the Time service instance |
| [in] | settings | pointer to a structure containing the new settings |
- Returns
- true if settings were successfully applied, false otherwise