From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15236 invoked by alias); 23 Apr 2011 17:11:35 -0000 Received: (qmail 15222 invoked by uid 22791); 23 Apr 2011 17:11:34 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hermes.mlbassoc.com (HELO mail.chez-thomas.org) (64.234.241.98) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Apr 2011 17:11:16 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 23A3516601B8; Sat, 23 Apr 2011 11:11:16 -0600 (MDT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by mail.chez-thomas.org (Postfix) with ESMTP id 81CD216601AC; Sat, 23 Apr 2011 11:11:15 -0600 (MDT) Message-ID: <4DB30833.7060508@mlbassoc.com> Date: Sat, 23 Apr 2011 17:11:00 -0000 From: Gary Thomas User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7 MIME-Version: 1.0 To: moktar_bouain CC: ecos-discuss@ecos.sourceware.org References: <31407684.post@talk.nabble.com> <31428080.post@talk.nabble.com> <4DACC019.50209@mlbassoc.com> <31428511.post@talk.nabble.com> <4DAD6CF1.4040403@mlbassoc.com> <31459410.post@talk.nabble.com> <4DB2E30C.6010704@mlbassoc.com> <31461897.post@talk.nabble.com> In-Reply-To: <31461897.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] measure the execution time of each thread X-SW-Source: 2011-04/txt/msg00088.txt.bz2 On 04/23/2011 09:07 AM, moktar_bouain wrote: > >> As I said before, look at how it's done in tm_basic.cxx > > I did, but I do not understand how to modify. > Can you give me some details? You don't want to modify that code, just look at how it computes time at a nanosecond scale. Look at the function show_time_in_us() which uses time values based on the function HAL_CLOCK_READ() that reads the system timer (whatever that may be) and calculates time to the most accurate value available in the system. This is based on the raw clock (often the hardware system clock) that's used to run the system 'tick' timer. On most systems, this value is accurate to micro-seconds, sometimes even nano-seconds. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss