All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] SEC() and MSEC() and USEC() macros
Date: Mon, 19 Mar 2007 16:32:07 +0000	[thread overview]
Message-ID: <20070319163207.GE774@us.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0703191148570.12453@CPE00045a9c397f-CM001225dbafb6>

On 19.03.2007 [11:51:23 -0400], Robert P. J. Day wrote:
> 
>   no, it's not a serious proposal but, boy, wouldn't it have made the
> code more readable if someone had defined macros/inline functions like
> sec(), msec() and usec() rather than cluttering up the code with
> things like "22*HZ/10" and "30*HZ/100".
> 
>   just thinking out loud, don't take it seriously.

Uh... You mean jiffies_to_msecs, jiffies_to_usecs (and their opposites)?

Note, you have to be careful with rounding, so you may need to add 1 to
the return of these *functions* (macros would be a terrible idea :)

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

      parent reply	other threads:[~2007-03-19 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 15:51 [KJ] SEC() and MSEC() and USEC() macros Robert P. J. Day
2007-03-19 16:04 ` Arnd Bergmann
2007-03-19 16:32 ` Nishanth Aravamudan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070319163207.GE774@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.