.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "TIMESPEC_TRUNC" "9" "09 October 2005" "" ""
.SH NAME
timespec_trunc \- Truncate timespec to a granuality
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct timespec timespec_trunc (struct timespec \fIt\fB, unsigned \fIgran\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIt\fB\fR
Timespec
.TP
\fB\fIgran\fB\fR
Granuality in ns.
.SH "DESCRIPTION"
.PP
Truncate a timespec to a granuality. gran must be smaller than a second.
Always rounds down.
.PP
This function should be only used for timestamps returned by
\fBcurrent_kernel_time\fR or CURRENT_TIME, not with \fBdo_gettimeofday\fR because
it doesn't handle the better resolution of the later.