| 352 | } |
| 353 | |
| 354 | void |
| 355 | clock_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 | |
| 372 | void |
| 373 | clock_print_ts(const struct timespec *ts, int nsdigits) |
no test coverage detected