| 341 | } |
| 342 | |
| 343 | void json_add_time(struct json_stream *result, const char *fieldname, |
| 344 | struct timespec ts) |
| 345 | { |
| 346 | char timebuf[100]; |
| 347 | |
| 348 | snprintf(timebuf, sizeof(timebuf), "%lu.%09u", |
| 349 | (unsigned long)ts.tv_sec, |
| 350 | (unsigned)ts.tv_nsec); |
| 351 | json_add_string(result, fieldname, timebuf); |
| 352 | } |
| 353 | |
| 354 | void json_add_timeiso(struct json_stream *result, |
| 355 | const char *fieldname, |
nothing calls this directly
no test coverage detected