Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Authentication-Warning: rachel.vtab.com: jojo set sender to jojo@virtutech.se using -f
To: Cygwin Mailinglist <cygwin@cygwin.com>
Subject: time:ing non-cygwin apps
From: Jesper Eskilson <jojo@virtutech.se>
Organization: Virtutech AB
Date: 05 Sep 2001 12:55:27 +0200
Message-ID: <u67lmjtlxeo.fsf@rachel.vtab.com>
Lines: 52
User-Agent: Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.1 (Cuyahoga Valley)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


Hi,

I'm trying to get some useful information about the execution time of
non-cygwin app. To illustrate, run the following shell-script:

--[ cygwintime.sh ]--

#!/bin/bash

cat > foo.c <<EOF
int main() {
  int i;
  for (i=0; i < 1000000000; i++);
}
EOF

gcc foo.c -o foo-cygwin
gcc -mno-cygwin foo.c -o foo-native

time ./foo-cygwin
time ./foo-native

--[ ... ]--

On my machine, I get the following output:

[0][SEBASTIAN] ~ -> ./cygwintime.sh

real    0m4.426s
user    0m4.346s
sys     0m0.010s

real    0m4.006s
user    0m0.010s
sys     0m0.010s
[0][SEBASTIAN] ~ ->


Note that the -mno-cygwin application takes almost no user or sys
time, but several seconds real time, as if the time command is unable
to report the time of non-cygwin applications. 

Naturally, I'd like to get similar results in both cases. Is there any
way I can get round this? (Is it a bug or a feature? ;-))

/Jesprer
-- 
-------------------------------------------------------------------------
Jesper Eskilson                                         jojo@virtutech.se
Virtutech                                         http://www.virtutech.se
-------------------------------------------------------------------------

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

