The uptime built-in command would print something like 0 days, 0:3:2, whereas I think 0 days, 0:03:02 is better.
dev seems to be one commit behind, so I'm targeting master. Let me know if you want me to change that.
I was also a little scared of the 20 character buffer - I did some calculations and it seems like sizeof "49 days, 17:02:47" is 18, so it should be ok. I would use snprintf(buff, sizeof buff, ...); if this was my code, just to be sure. It is slower though.
The
uptime
built-in command would print something like0 days, 0:3:2
, whereas I think0 days, 0:03:02
is better.dev
seems to be one commit behind, so I'm targetingmaster
. Let me know if you want me to change that.I was also a little scared of the 20 character buffer - I did some calculations and it seems like
sizeof "49 days, 17:02:47"
is 18, so it should be ok. I would usesnprintf(buff, sizeof buff, ...);
if this was my code, just to be sure. It is slower though.