From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 22 10:56:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB4D116A400 for ; Fri, 22 Feb 2008 10:56:42 +0000 (UTC) (envelope-from sharadc@in.niksun.com) Received: from in.niksun.com (210.18.76.166.sify.net [210.18.76.166]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6D313C474 for ; Fri, 22 Feb 2008 10:56:42 +0000 (UTC) (envelope-from sharadc@in.niksun.com) Received: from sharadc.in.niksun.com (unknown [10.60.5.27]) by in.niksun.com (Postfix) with ESMTP id B9A695D39; Fri, 22 Feb 2008 16:20:14 +0530 (IST) From: Sharad Chandra Organization: NIKSUN To: freebsd-hackers@freebsd.org Date: Fri, 22 Feb 2008 15:58:42 +0530 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802221558.42443.sharadc@in.niksun.com> Subject: usleep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 10:56:42 -0000 Hi Guys, Does usleep work for you? i just saw it is implemented over nanosleep which passes a struct timeval to "select". on my system, one of instance for usleep and select sleep value. provided (sec).(microsec) => select (sleep) usleep (sleep) 0.000000 => select: 0.000004 usleep: 0.000008 0.000001 => select: 0.002199 usleep: 0.001758 0.000002 => select: 0.004125 usleep: 0.001688 0.000003 => select: 0.005546 usleep: 0.001999 0.000004 => select: 0.006645 usleep: 0.002045 0.000005 => select: 0.001374 usleep: 0.002034 0.000006 => select: 0.002480 usleep: 0.001996 0.000007 => select: 0.006715 usleep: 0.001998 0.000008 => select: 0.002297 usleep: 0.001662 0.000009 => select: 0.002635 usleep: 0.001999 0.000010 => select: 0.003717 usleep: 0.001988 -- Thanks Sharad Chandra