MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_add_timestr

Function json_add_timestr

common/json_stream.c:366–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366void json_add_timestr(struct json_stream *result, const char *fieldname,
367 struct timespec ts)
368{
369 char timebuf[100];
370
371 snprintf(timebuf, sizeof(timebuf), "%lu.%09u",
372 (unsigned long)ts.tv_sec,
373 (unsigned)ts.tv_nsec);
374 json_add_string(result, fieldname, timebuf);
375}
376
377void json_add_timeiso(struct json_stream *result,
378 const char *fieldname,

Callers 4

log_to_jsonFunction · 0.85
json_getlogFunction · 0.85

Calls 1

json_add_stringFunction · 0.70

Tested by

no test coverage detected