From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 14 23:07:21 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86B0616A4CE for ; Thu, 14 Apr 2005 23:07:21 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4B8F43D2D for ; Thu, 14 Apr 2005 23:07:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j3EN6SUu004248; Thu, 14 Apr 2005 17:06:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 14 Apr 2005 17:06:45 -0600 (MDT) Message-Id: <20050414.170645.132440858.imp@bsdimp.com> To: xdivac02@stud.fit.vutbr.cz From: "M. Warner Losh" In-Reply-To: <20050412145401.GA17895@stud.fit.vutbr.cz> References: <20050412145401.GA17895@stud.fit.vutbr.cz> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: dipjyoti.saikia@gmail.com Subject: Re: What is the best way to introduce delay in kernel ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 23:07:21 -0000 In message: <20050412145401.GA17895@stud.fit.vutbr.cz> Divacky Roman writes: : On Tue, Apr 12, 2005 at 06:01:52PM +0530, Dipjyoti Saikia wrote: : > Hi , : > : > I am writing a device driver and using DELAY() to intoduce delays in : > my code .Are there any better ways of doing the same for FreeBSD 4.10 : > ? : : : you can use [tm]sleep for this... or with another approach callouts might be : usefull DELAY is useful for short delays (< 1-2hz), while [tm]sleep are useful for longer delays. Warner