]> granicus.if.org Git - strace/commit
print_timespec.c: introduce helper macros and functions
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 9 May 2019 22:03:30 +0000 (22:03 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 9 May 2019 22:03:30 +0000 (22:03 +0000)
commit7e4cb006252fd33dbfa9f6ef025acc6e9c28a29e
tree4698d6d24a125fd0d82e62a51ae0d46bf187e395
parent29fbe2f78fd2caaf704725a0e8bd6320ad3fb377
print_timespec.c: introduce helper macros and functions

They are going to be used to implement printers of other timespec
flavours, e.g. kernel_timespec32_t and kernel_timespec64_t.

* print_timespec.c (TIMESPEC_TO_SEC_NSEC): New macro.
(print_timespec_t_utime, sprint_timespec): Use it.
(print_sec_nsec): New function.
(print_timespec_t): Use it.
print_timespec.c