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

Function json_add_time

common/json_stream.c:343–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void 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
354void json_add_timeiso(struct json_stream *result,
355 const char *fieldname,

Callers

nothing calls this directly

Calls 1

json_add_stringFunction · 0.70

Tested by

no test coverage detected