From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24378 invoked by alias); 26 May 2014 20:37:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32622 Received: (qmail 24968 invoked from network); 26 May 2014 20:37:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=m1Xf++YqN5ZUmrFqUeWuaV984DNIWvMYmWKCBouYUJI=; b=v3Y9D+2Gw81alGDnmJLFm8fEiHMb+tgcnWAkd65wWB/pi1peEycU5O5ovYvbb2O3y9 ault+YOm37080CHV1W4L/O2F/qwB1td+cYvb3MVzvvJ7EcqjGKPz8s5twb6STazg99C8 IIAOjzKJCkpSHBwEw66CAdCry9JqJzTsBhISZ8grQ1/q346rsqzmrtZV0nyXnz+EW9PN nBJSEFLrqBSdjhRIByThPbBDvNK2MXhODa3fv4FXB6Zuybi0jl+7Xd6XF8uWqk6NnsPe 9lH48idYI4qhywlyeQv3Tv68G4cXUi+7bAnouNPjd78xEq7XH/bYxt9synV7ZI7lIIjo yZew== X-Received: by 10.194.243.3 with SMTP id wu3mr33795273wjc.29.1401135200953; Mon, 26 May 2014 13:13:20 -0700 (PDT) Date: Mon, 26 May 2014 21:13:18 +0100 From: Stephane Chazelas To: Zsh hackers list Subject: [bug] times builtin output wrong Message-ID: <20140526201318.GA10886@chaz.gmail.com> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) $ times 0m3.36s 0m1.95s 0m12.23s 0m0.15s $ time shell 2.02s user 1.17s system 1% cpu 3:36.66 total children 7.34s user 0.10s system 3% cpu 3:36.66 total $ echo $((7.34*100/60)) 12.233333333333333 It looks like they're expressed in 60/100th of seconds. The code has: /* display a time, provided in units of 1/60s, as minutes and seconds */ #define pttime(X) printf("%ldm%ld.%02lds",((long) (X))/3600,\ ((long) (X))/60%60,((long) (X))*100/60%100) So it kind of assumes the times are in 1/60s but they're not, they're in clock ticks. The "time" output is correct though. -- Stephane