结构体 | |
struct | sntp_arg |
struct | sntp_time |
宏定义 | |
#define | SNTP_PORT 123 |
#define | SNTP_SUPPORT_MULTIPLE_SERVERS 1 |
#define | SNTP_MAX_SERVERS 3 |
#define | SNTP_RECV_TIMEOUT 3000 /* ms */ |
#define | SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT |
#define | SNTP_RETRY_TIMES 3 |
#define | SNTP_SERVER_ADDRESS "pool.ntp.org" |
函数 | |
int | sntp_request (void *arg) |
sntp_time * | sntp_obtain_time (void) |
int | sntp_get_time (sntp_arg *arg, struct timeval *ntp_time) |
int | sntp_set_server (uint8_t idx, char *server_name) |
int | sntp_last_query_status (void) |
int | sntp_set_time_direct (long long now_ms) |
变量 | |
char * | server_name |
int | recv_timeout |
uint8_t | retry_times |
uint8_t | sec |
uint8_t | min |
uint8_t | hour |
uint8_t | day |
uint8_t | mon |
uint8_t | week |
uint8_t | year |
#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT |
int sntp_get_time | ( | sntp_arg * | arg, |
struct timeval * | ntp_time | ||
) |
int sntp_last_query_status | ( | void | ) |
sntp_time* sntp_obtain_time | ( | void | ) |
int sntp_request | ( | void * | arg | ) |
int sntp_set_server | ( | uint8_t | idx, |
char * | server_name | ||
) |
int sntp_set_time_direct | ( | long long | now_ms | ) |