Re: looking for another function

Ingo Molnar (
Mon, 9 Jun 1997 18:29:09 +0200 (MET DST)

On Mon, 9 Jun 1997, Patrick St. Jean wrote:

> Thanks for the udelay() answer... I've got another one now:
> I'm "adapting" the Solaris driver's ioctl() routines to linux and have
> been seeing this function a lot: drv_usectohz() which onverts microseconds
> to clock ticks. It seems to be used in timeouts and such. Is there an
> equivalent function (I couldn't find anything that matched with a grep),
> or should I be using something else to get similar numbers.

just use:

#define drv_usectohz(x) ((x)*HZ/1000000)

-- mingo