Added quick and dirty _gettimeofday_r() test implementation.
This commit is contained in:
parent
16c831fffa
commit
0482aebf7d
2 changed files with 22 additions and 0 deletions
|
@ -50,6 +50,14 @@ void SntpTsk(void *pvParameters)
|
|||
sntp_initialize(1, 0);
|
||||
sntp_set_servers(servers, sizeof(servers) / sizeof(char*));
|
||||
printf("DONE!\n");
|
||||
|
||||
struct timespec ts;
|
||||
clock_getres(CLOCK_REALTIME, &ts);
|
||||
printf("Time resolution: %d secs, %d nanosecs\n", t.tv_sec, t.tv_nsec);
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &t);
|
||||
printf("Time: %d secs, %d nanosecs\n", t.tv_sec, t.tv_nsec);
|
||||
|
||||
while(1) {
|
||||
vTaskDelayMs(5000);
|
||||
time_t ts = sntp_get_rtc_time(NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue