Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Nov 1996 15:54:31 -0600
From:      "Eric L. Hernes" <erich@lodgenet.com>
To:        amir@comtrol.com (Amir Farah)
Cc:        hackers@freebsd.org
Subject:   Re: timeout() function 
Message-ID:  <199611082154.PAA00388@jake.lodgenet.com>
In-Reply-To: Your message of "Fri, 08 Nov 1996 09:41:05 CST." <199611081541.JAA00123@rocket.comtrol.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Amir Farah writes:
>Hello
>
>I have a question about the timeout() function in /sys/kern/kern_clock.c file.
>
>You can execute a function after a specified length of time using 
>timeout(ftn, arg, ticks)
>
>ftn: function to be called
>args: arguments for the function
>ticks: delay
>
>If I pass "1" for the delay, does it mean the function will get called every
>1 second?? I want to be able to call a funtion every 50 milisecond (or less). 
>

ticks are 1/100 sec, so with a timeout of 1, your function will be
called 100 times a second. If you want faster, you can hook into
a clock interrupt, see the pcaudio driver for an example.  Drivers
that don't use interrupts can use these `callouts' for pseudo-interrupts.

>
>Thanks
>
>amir
>
>

eric.
-- 
erich@lodgenet.com
http://rrnet.com/~erich erich@rrnet.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611082154.PAA00388>