| 334 | } |
| 335 | |
| 336 | void |
| 337 | clock_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 | |
| 354 | void |
| 355 | clock_print_ct(const struct clocktime *ct, int nsdigits) |
no test coverage detected