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

Function clock_print_bcd

freebsd/kern/subr_clock.c:336–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336void
337clock_print_bcd(const struct bcd_clocktime *bct, int nsdigits)
338{
339
340 KASSERT(nsdigits >= 0 && nsdigits <= 9, ("bad nsdigits %d", nsdigits));
341
342 if (nsdigits > 0) {
343 printf("%4.4x-%2.2x-%2.2x %2.2x:%2.2x:%2.2x.%*.*ld",
344 bct->year, bct->mon, bct->day,
345 bct->hour, bct->min, bct->sec,
346 nsdigits, nsdigits, bct->nsec / nsdivisors[nsdigits]);
347 } else {
348 printf("%4.4x-%2.2x-%2.2x %2.2x:%2.2x:%2.2x",
349 bct->year, bct->mon, bct->day,
350 bct->hour, bct->min, bct->sec);
351 }
352}
353
354void
355clock_print_ct(const struct clocktime *ct, int nsdigits)

Callers 1

clock_dbgprint_bcdFunction · 0.85

Calls 1

printfFunction · 0.70

Tested by

no test coverage detected