Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262326AbVCVHqW (ORCPT ); Tue, 22 Mar 2005 02:46:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262290AbVCVHqW (ORCPT ); Tue, 22 Mar 2005 02:46:22 -0500 Received: from linux01.gwdg.de ([134.76.13.21]:58784 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S262326AbVCVHqO (ORCPT ); Tue, 22 Mar 2005 02:46:14 -0500 Date: Tue, 22 Mar 2005 08:46:12 +0100 (MET) From: Jan Engelhardt cc: linux-kernel@vger.kernel.org Subject: Re: Short sleep precision In-Reply-To: <423EF7B5.2030507@nortel.com> Message-ID: References: <423EF7B5.2030507@nortel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 649 Lines: 23 Hello, >> > You can spin on the gettimeofday() result in userspace. >> How can I use it? > Something like: > > gettimeofday(&curtime,0); > add_usecs(&curtime, time_to_sleep); > do { > gettimeofday(&curtime,0); > } while (time_before(&curtime, &expiry); That's looks like a lot of CPU consumption, which I would like to avoid because time_to_sleep is nondeterministic in my case. Jan Engelhardt -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/