#include "emb-time.h" #ifdef ARDUINO /*TODO: arduino embTime includes */ #else #include #endif void embTime_initNow(EmbTime* t) { #ifdef ARDUINO /*TODO: arduino embTime_initNow */ #else time_t rawtime; struct tm* timeinfo; time(&rawtime); timeinfo = localtime(&rawtime); t->year = timeinfo->tm_year; t->month = timeinfo->tm_mon; t->day = timeinfo->tm_mday; t->hour = timeinfo->tm_hour; t->minute = timeinfo->tm_min; t->second = timeinfo->tm_sec; #endif /* ARDUINO */ } EmbTime embTime_time(EmbTime* t) { #ifdef ARDUINO /*TODO: arduino embTime_time */ #else int divideByZero = 0; divideByZero = divideByZero/divideByZero; /*TODO: wrap time() from time.h and verify it works consistently */ #endif /* ARDUINO */ } /* kate: bom off; indent-mode cstyle; indent-width 4; replace-trailing-space-save on; */