MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / millis2clock

Function millis2clock

libraries/dateTimeHelpers/dateTimeHelpers.h:210–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210char * millis2clock(uint32_t millis)
211{
212 char * buf = __dateTimeHelperBuffer;
213
214 uint32_t t = millis / 1000;
215 seconds2clock24(t, true);
216 uint8_t pos = strlen(buf);
217
218 uint16_t m = millis - t * 1000;
219 buf[pos++] = '.';
220 uint8_t d = m / 100;
221 buf[pos++] = d + '0';
222 m = m - d * 100;
223 d = m / 10;
224 buf[pos++] = d + '0';
225 d = m - d * 10;
226 buf[pos++] = d + '0';
227 buf[pos++] = '\0';
228
229 return buf;
230}
231
232
233///////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

seconds2clock24Function · 0.85

Tested by

no test coverage detected