| 221 | } |
| 222 | |
| 223 | static void |
| 224 | get_time_now_str(char *const buf, size_t const buflen) |
| 225 | { |
| 226 | TSHRTime const timenowusec = TShrtime(); |
| 227 | int64_t const timemsec = (int64_t)(timenowusec / 1000000); |
| 228 | time_t const timesec = (time_t)(timemsec / 1000); |
| 229 | int const ms = (int)(timemsec % 1000); |
| 230 | |
| 231 | struct tm tm; |
| 232 | gmtime_r(×ec, &tm); |
| 233 | size_t const dtlen = strftime(buf, buflen, "%b %e %H:%M:%S", &tm); |
| 234 | |
| 235 | // tack on the ms |
| 236 | snprintf(buf + dtlen, buflen - dtlen, ".%03d", ms); |
| 237 | } |
| 238 | |
| 239 | // dump exhaustive per state summary stats |
| 240 | static int |
no test coverage detected