aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2018-02-12 16:25:56 +0000
committerIan Lepore <ian@FreeBSD.org>2018-02-12 16:25:56 +0000
commitaedc51f11adb0f977dea9c3092eabebec2c3fe07 (patch)
treecc405911abb16f525265525e59aa38d6a4d25279 /sys/sys
parent5ec69a1509ad10d68b93577b64f214eb80259bc4 (diff)
downloadsrc-aedc51f11adb0f977dea9c3092eabebec2c3fe07.tar.gz
src-aedc51f11adb0f977dea9c3092eabebec2c3fe07.zip
Replace the existing print_ct() private debugging function with a set of
three public functions to format and print the three major data structures used by realtime clock drivers (clocktime, bcd_clocktime, and timespec).
Notes
Notes: svn path=/head/; revision=329170
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/clock.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/sys/clock.h b/sys/sys/clock.h
index cb7503497c57..a5e89746d488 100644
--- a/sys/sys/clock.h
+++ b/sys/sys/clock.h
@@ -182,6 +182,15 @@ void timespec2fattime(const struct timespec *tsp, int utc, u_int16_t *ddp,
void fattime2timespec(unsigned dd, unsigned dt, unsigned dh, int utc,
struct timespec *tsp);
+/*
+ * Print a [bcd_]clocktime or timespec, optionally with fractional seconds. The
+ * nsdig argument can range from 0-9, and specifies how many decimal digits to
+ * display for fractional seconds.
+ */
+void clock_print_bcd(const struct bcd_clocktime *bct, int nsdig);
+void clock_print_ct(const struct clocktime *ct, int nsdig);
+void clock_print_ts(const struct timespec *ts, int nsdig);
+
#endif /* _KERNEL */
#endif /* !_SYS_CLOCK_H_ */