Open
Description
I'm working on an application that is time sensitive, at least in a relative way.
I don't need exact microsecond precision of the returned time, but I need a more or less reliable way to determine at the millisecond where I'm standing compared to the epoch.
Simply giving access to _lastUpdate does the job I think, as I can now get a string representing a ms epoch that way :
unsigned long seconds = timeClient.getEpochTime();
unsigned long ms = (millis() - timeClient.getLastUpdate()) % 1000;
char ms_char[12];
sprintf(ms_char,"%lu%03lu",seconds,ms);
Now I don't know what the best design is for this library :
- Propose a
getMillisecondString()
- Simply let use deal with a public
getLastUpdate()
like I did - Deal with 64bit to return a
ms
epoch as a number...
Metadata
Metadata
Assignees
Labels
No labels