Closed eskhisov closed 4 years ago
Ok, this works for me (I need string representation):
char buffer [3];
sprintf(buffer,"%03d",ms());
String milliEpoch = String(now()) + buffer;
Thanks, very helpful.
What happens if ms() is 1000? Or it can only be 999?
ms()
can only return values from 0 to 999
Is there a way to get Unix millisecond timestamp? Documentation says that the Unix epoch time returned by now() is in seconds by default. I guess I can get time in RFC3339_EXT format and convert back to epoch, but you already have milliseconds, so it feels kludgy.