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
content-class: urn:content-classes:message
Subject: RE: Timing problem
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Date: Fri, 6 Jul 2001 18:44:36 +1000
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
Message-ID: <EA18B9FA0FE4194AA2B4CDB91F73C0EF7A16@itdomain002.itdomain.net.au>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Timing problem
Thread-Index: AcEF9nHXYLzSdDOiQ9GUQ1pW/vSABAAACBHQ
From: "Robert Collins" <robert.collins@itdomain.com.au>
To: "Morrison, John" <John.Morrison@uk.experian.com>, <cygwin@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id EAA13937


> -----Original Message-----
> From: Morrison, John [mailto:John.Morrison@uk.experian.com]
> Sent: Friday, July 06, 2001 6:37 PM
> To: 'cygwin@cygwin.com'
> Subject: RE: Timing problem
> 
> 
> Nope:
> 
> w
> 
> real    0m0.422s
> user    0m0.062s
> sys     0m0.077s
> 
> What made you think of the brackets?  I think that the ls is 
> being piped
> into grep.
> 

My previous test cases

$ time echo | less


real    0m3.796s
user    0m0.080s
sys     0m0.080s

note the two lines under the prompt. You can't see it here, but less
paused with (END) _before_ the real user and sys values came up.

$ (time echo) | less

real    0m0.000s
user    0m0.000s
sys     0m0.000s

Note the single line after the prompt, and the 0 time length :].  That
gave me the conclusion that your first problem was that time was timing
the egrep as well as the command. Trying with ls as you indicated gives
me the time output to console still... but it times the ls as opposed to
the less.

Try three: with a little persistence:

$ (time ls > /dev/null) 2>&1 | egrep '^real'
real    0m0.241s

Rob

--
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/

