From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54705 invoked by alias); 13 Sep 2019 19:11:42 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 54687 invoked by uid 89); 13 Sep 2019 19:11:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=portable, HX-Languages-Length:747, HX-Spam-Relays-External:ESMTPA X-HELO: chocolate.birch.relay.mailchannels.net Received: from chocolate.birch.relay.mailchannels.net (HELO chocolate.birch.relay.mailchannels.net) (23.83.209.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Sep 2019 19:11:40 +0000 X-Sender-Id: dreamhost|x-authsender|dropbox@opencoder.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7558F2C29AC for ; Fri, 13 Sep 2019 19:11:38 +0000 (UTC) Received: from pdx1-sub0-mail-a86.g.dreamhost.com (100-96-83-181.trex.outbound.svc.cluster.local [100.96.83.181]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D1DAC2C2CBD for ; Fri, 13 Sep 2019 19:11:37 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|dropbox@opencoder.net Received: from pdx1-sub0-mail-a86.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Fri, 13 Sep 2019 19:11:38 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dropbox@opencoder.net X-MailChannels-Auth-Id: dreamhost X-Cure-Fearful: 57b03963060558cc_1568401898073_4289858146 X-MC-Loop-Signature: 1568401898073:2982215708 X-MC-Ingress-Time: 1568401898073 Received: from pdx1-sub0-mail-a86.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTP id 423367F95B for ; Fri, 13 Sep 2019 12:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=opencoder.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type; s=opencoder.net; bh=6EHMo+Ayu7IQiiTeF52ZUkj+f4 I=; b=UcNZftRguIy6lHE42y5uIdixM8YRc/PIz82NZ5Oeyjd413nT8oslremB3F 9Srhh8m3KQLRjzCmtI59PUJQVg6VT3ShjBZJeXIhhXlIcjy5xzzBb9wYs3PnVq7O ycN3GxnQgg+BaIAAwsz50rHEApi9HaArViMo8PDU5UsF0A0jU= Received: from mail-yw1-f53.google.com (mail-yw1-f53.google.com [209.85.161.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dropbox@opencoder.net) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTPSA id ED19C7F959 for ; Fri, 13 Sep 2019 12:11:34 -0700 (PDT) Received: by mail-yw1-f53.google.com with SMTP id i207so10791886ywc.9 for ; Fri, 13 Sep 2019 12:11:34 -0700 (PDT) MIME-Version: 1.0 References: <78512bbe-b912-9bf5-d6cf-9da5b982c955@SystematicSw.ab.ca> <016201d56a26$37271f70$a5755e50$@twcny.rr.com> In-Reply-To: <016201d56a26$37271f70$a5755e50$@twcny.rr.com> X-DH-BACKEND: pdx1-sub0-mail-a86 From: Wayne Davison Date: Fri, 13 Sep 2019 19:59:00 -0000 Message-ID: Subject: Re: Bug in TIME function To: cygwin Content-Type: text/plain; charset="UTF-8" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrtdejgddufeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpeggfhgjhfffkffuvfgtsehttdertddttdejnecuhfhrohhmpeghrgihnhgvucffrghvihhsohhnuceofigrhihnvgesohhpvghntghouggvrhdrnhgvtheqnecukfhppedvtdelrdekhedrudeiuddrheefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdqhiifuddqfhehfedrghhoohhglhgvrdgtohhmpdhinhgvthepvddtledrkeehrdduiedurdehfedprhgvthhurhhnqdhprghthhephggrhihnvgcuffgrvhhishhonhcuoeifrgihnhgvsehophgvnhgtohguvghrrdhnvghtqedpmhgrihhlfhhrohhmpeifrgihnhgvsehophgvnhgtohguvghrrdhnvghtpdhnrhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00166.txt.bz2 On Fri, Sep 13, 2019 at 4:27 AM wrote: > In Linux [times()] returns a time value and return code of 0: The Linux man page for times() mentions this special behavior, how it isn't portable, and even advises against using the function: "On Linux, the buf argument can be specified as NULL, with the result that times() just returns a function result. However, POSIX does not specify this behavior, and most other UNIX implementations require a non-NULL value for buf." "[...] a portable application would be wise to avoid using this value. To measure changes in elapsed time, use clock_gettime(2) instead." One might argue that it would be nice to emulate the Linux behavior, but it's not required by POSIX. ..wayne.. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple