X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; q=dns; s=default; b=gtH6+sr dm8SF9KX9etaxQ4z9yRez71OClxOwKObJF+ZH+9e0o3E7SI7aGP2ALAOYpFZtjSm 4AJz8Susk/PyZzar6lpk87wC+ldmy+1KL/NbqD9DRi2gXd43v0/F8JYbiftABEfb TgmTvxju7LJJyjdgWMvHqQczN/DRqQHJYwL0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=default; bh=SvM3vgrkN1XHu wwqzD5/ybGGP4E=; b=yHFWAwyLVfdeX6qZZUApz8pXbhhIYNHkupJRjCYgDWaDU 0s+R5vw26vusN95rKJkbM2on+ONy6Ngpczmj9htlfLLMBg6zHpjnfByZ3BjNoBvB B8eFvwC9eCyswALiHp0PVbBdyzIScmh957SnCGqRsDIdgFBAdNclDFHEf+xric= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 X-Sender-Id: dreamhost|x-authsender|dropbox AT opencoder DOT net X-Sender-Id: dreamhost|x-authsender|dropbox AT opencoder DOT net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dropbox AT opencoder DOT net X-MailChannels-Auth-Id: dreamhost X-Cure-Fearful: 57b03963060558cc_1568401898073_4289858146 X-MC-Loop-Signature: 1568401898073:2982215708 X-MC-Ingress-Time: 1568401898073 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= MIME-Version: 1.0 References: <78512bbe-b912-9bf5-d6cf-9da5b982c955 AT SystematicSw DOT ab DOT 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 12:11:23 -0700 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 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