Work towards improving signals and processes

This commit is contained in:
Justine Tunney 2021-01-27 19:34:02 -08:00
parent de703b182c
commit d7ac16a9ed
96 changed files with 1474 additions and 427 deletions

View file

@ -27,6 +27,13 @@ static unsigned clip(unsigned index, unsigned count) {
return index < count ? index : 0;
}
/**
* Converts date time to string.
*
* @param buf needs to have 64 bytes
* @return pointer to buf
* @see asctime_r for reentrant version
*/
char *asctime_r(const struct tm *date, char buf[hasatleast 64]) {
(snprintf)(buf, 64, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
kWeekdayNameShort[clip(date->tm_wday, 7)],