From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1543 invoked by alias); 22 Oct 2003 11:30:26 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 1529 invoked from network); 22 Oct 2003 11:30:26 -0000 Received: from unknown (HELO anchor-post-34.mail.demon.net) (194.217.242.92) by sources.redhat.com with SMTP; 22 Oct 2003 11:30:26 -0000 Received: from calivar.demon.co.uk ([212.228.213.211] helo=miso.calivar.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1ACHC4-0003jB-0Y; Wed, 22 Oct 2003 12:30:24 +0100 Received: from miso.calivar.com (miso.calivar.com [127.0.0.2]) by miso.calivar.com (Postfix) with ESMTP id DAD2828DF46; Wed, 22 Oct 2003 11:17:25 +0100 (BST) To: Luca Formaggio Cc: ecos-discuss@sources.redhat.com References: <20031022084056.7297.qmail@web41402.mail.yahoo.com> From: Nick Garnett Date: Wed, 22 Oct 2003 11:30:00 -0000 In-Reply-To: <20031022084056.7297.qmail@web41402.mail.yahoo.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] to consume cpu time X-SW-Source: 2003-10/txt/msg00392.txt.bz2 Luca Formaggio writes: > Hi. I need to consume a cpu time in a program. This > time is in nanoseconds. Is there a ecos function that > consume time in nanoseconds? If it exists, how I call > this function from my program? There's nothing in eCos that can handle that. The best we have is HAL_DELAY_US() which approximates a given microsecond delay. If you want to insert delays for sub-microsecond periods then the best approach is probably to use timed code loops. Even then, your timing is going to be thrown out by any interupts. Even cache misses or DRAM refresh cycles may affect you. -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss