* [KJ] SEC() and MSEC() and USEC() macros
@ 2007-03-19 15:51 Robert P. J. Day
2007-03-19 16:04 ` Arnd Bergmann
2007-03-19 16:32 ` Nishanth Aravamudan
0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-03-19 15:51 UTC (permalink / raw)
To: kernel-janitors
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.
rday
--
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] SEC() and MSEC() and USEC() macros
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
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2007-03-19 16:04 UTC (permalink / raw)
To: kernel-janitors
On Monday 19 March 2007, 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.
There is recurring discussion about making sure that for every interface
that takes a jiffie argument, we have a replacement that takes a proper
unit of time (ktime_t, clock_t, timespec, nanoseconds, microseconds, ...).
In short, we have too many ways to express time, and the jiffies are the
least useful one.
Arnd <><
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] SEC() and MSEC() and USEC() macros
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
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Aravamudan @ 2007-03-19 16:32 UTC (permalink / raw)
To: kernel-janitors
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-19 16:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.