'\" t .\" Title: round_jiffies .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "ROUND_JIFFIES" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" round_jiffies \- function to round jiffies to a full second .SH "SYNOPSIS" .HP \w'unsigned\ long\ round_jiffies('u .BI "unsigned long round_jiffies(unsigned\ long\ " "j" ");" .SH "ARGUMENTS" .PP \fIj\fR .RS 4 the time in (absolute) jiffies that should be rounded .RE .SH "DESCRIPTION" .PP \fBround_jiffies\fR rounds an absolute time in the future (in jiffies) up or down to (approximately) full seconds\&. This is useful for timers for which the exact time they fire does not matter too much, as long as they fire approximately every X seconds\&. .PP By rounding these timers to whole seconds, all such timers will fire at the same time, rather than at various times spread out\&. The goal of this is to have the CPU wake up less, which saves power\&. .PP The return value is the rounded version of the \fIj\fR parameter\&. .SH "COPYRIGHT" .br