MCPcopy Create free account
hub / github.com/F-Stack/f-stack / clock_print_ct

Function clock_print_ct

freebsd/kern/subr_clock.c:354–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354void
355clock_print_ct(const struct clocktime *ct, int nsdigits)
356{
357
358 KASSERT(nsdigits >= 0 && nsdigits <= 9, ("bad nsdigits %d", nsdigits));
359
360 if (nsdigits > 0) {
361 printf("%04d-%02d-%02d %02d:%02d:%02d.%*.*ld",
362 ct->year, ct->mon, ct->day,
363 ct->hour, ct->min, ct->sec,
364 nsdigits, nsdigits, ct->nsec / nsdivisors[nsdigits]);
365 } else {
366 printf("%04d-%02d-%02d %02d:%02d:%02d",
367 ct->year, ct->mon, ct->day,
368 ct->hour, ct->min, ct->sec);
369 }
370}
371
372void
373clock_print_ts(const struct timespec *ts, int nsdigits)

Callers 4

clock_dbgprint_ctFunction · 0.85
clock_ct_to_tsFunction · 0.85
clock_ts_to_ctFunction · 0.85
clock_print_tsFunction · 0.85

Calls 1

printfFunction · 0.70

Tested by

no test coverage detected