This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

time:ing non-cygwin apps



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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]