Removed non working clock_* calls from example. Using vars for tz and dst.

This commit is contained in:
doragasu 2016-03-13 17:04:03 +01:00
parent 0482aebf7d
commit f14025b1c7
3 changed files with 62 additions and 37 deletions

View file

@ -51,12 +51,12 @@ void SntpTsk(void *pvParameters)
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);
// 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);