From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18807 invoked by alias); 20 Nov 2003 22:38:43 -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 18798 invoked from network); 20 Nov 2003 22:38:42 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sources.redhat.com with SMTP; 20 Nov 2003 22:38:42 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id 4CE9B50D8D3; Thu, 20 Nov 2003 15:38:42 -0700 (MST) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id DDEB850D8B8; Thu, 20 Nov 2003 15:38:39 -0700 (MST) From: Gary Thomas To: Yusuke Matsuoka Cc: 'Andrew Lunn' , ecos-discuss@sources.redhat.com In-Reply-To: <001101c3afb6$7eac0fe0$99596180@worldcup> References: <001101c3afb6$7eac0fe0$99596180@worldcup> Content-Type: text/plain Organization: MLB Associates Message-Id: <1069367919.1961.669.camel@hermes> Mime-Version: 1.0 Date: Thu, 20 Nov 2003 22:38:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: RE: [ECOS] how to link "gettimeofday" with arm-elf-gcc? X-SW-Source: 2003-11/txt/msg00286.txt.bz2 On Thu, 2003-11-20 at 15:34, Yusuke Matsuoka wrote: > Hi Andrew and Gary, > > Thanks for the reply. > > I want to run the KVM(K virtual machine for Java) on eCos and > want to measure the exec time of my Java application on the board. > The original KVM implementation uses "gettimeofday", and I got > the linker error. > > Since I need a *millisecond* resolution, is there a better way > rather than including snmp? > I want to keep the footprint small. > (ctime(time()) is a *second* resolution, right?) > The eCos system clock will normally run at 10ms resolution. If you need something better than that, you could either run the system clock faster (not recommended), or there are HAL functions which will let you calculate finer grain times. Look at ${ECOS_REPOSITORY}/kernel/current/tests/tm_basic.cxx for an example of how to measure time down to micro-seconds (without any changes to eCos or even the standard configuration). > Thanks, > Yusuke > > > -----Original Message----- > > From: ecos-discuss-owner@sources.redhat.com > > [mailto:ecos-discuss-owner@sources.redhat.com] On Behalf Of > > Andrew Lunn > > Sent: Thursday, November 20, 2003 2:06 PM > > To: Yusuke MATSUOKA > > Cc: ecos-discuss@sources.redhat.com > > Subject: Re: [ECOS] how to link "gettimeofday" with arm-elf-gcc? > > > > > > > I got an error that linker cannot find "gettimeofday" as follows: > > > > gettimeofday was added the posix only recently, so eCos does not yet > > implement it as part of libc. > > > > Either use ctime(time()) or include the snmp stack which does have > > gettimeofday(). > > > > Andrew > > > > -- > > Before posting, please read the FAQ: > > http://sources.redhat.com/fom/ecos > > and search the list > > archive: http://sources.redhat.com/ml/ecos-discuss > > -- Gary Thomas MLB Associates -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss