X-Recipient: archive-cygwin@delorie.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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=H0h9KMIVvQS+d3ZaS9cctZjDrFUx09gZWsjJyUD0MuZ
	Qv68u7u9ht+V0IqjZONVccaOSsnX8UAuDEPtSr+LbMoJ5MjPdjKhF40+XczY3G9p
	uKDFHt891Puzyffdu31rnrpRSmZSnC3el4o2x5X+sskCFoMjPle0Elzc7JJ4VSLI
	=
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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=GiaUqxE+9Nlw7mqSpHlCskBwDXc=; b=qU5IGaIZ6NK9mbAv2
	ud8+gKB+Wb0ac5sgiPPxsZ2W+V+BJ6O8tUqAy6s+srBOhU/iCNmNIKGrEVtDihgY
	fbttKupQnxQYTR/zlfmw4EB8eFBntFWVkp4VZ1LlvHvNe7sA2e7AyuD6gEKcGkfe
	m0jFGWNFPai/dRV3W0w2hRxCM8=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1
Message-ID: <51670B6B.3000503@net-b.de>
Date: Thu, 11 Apr 2013 21:13:47 +0200
From: Tobias Burnus <burnus@net-b.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
MIME-Version: 1.0
To: cygwin@cygwin.com, fortran@gcc.gnu.org
Subject: Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0
References: <5166A0B3.70801@net-b.de> <5166BCA1.5040204@net-b.de> <20130411134835.GD18333@calimero.vinschen.de>
In-Reply-To: <20130411134835.GD18333@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Corinna Vinschen wrote:
> Works fine for me with the current Cygwin 1.7.17, and the upcoming
> Cygwin 1.7.18:
>      if (!clock_gettime (CLOCK_MONOTONIC, &tp))
>        printf ("tv_sec = %ld, tv_nsec = %ld\n", tp.tv_sec, tp.tv_nsec);
...
>    tv_sec = 0, tv_nsec = 29920

Where is actually the source code of the clock_gettime, which Cygwin 
uses? I thought that it was newlib. But looking at
http://sourceware.org/cgi-bin/cvsweb.cgi/src/newlib/libc/sys/linux/clock_gettime.c?cvsroot=src
the code should return -1 for "clock_gettime (CLOCK_MONOTONIC" as 
CLOCK_MONOTONIC (= 4) is not handled, only CLOCK_REALTIME (= 1, 
according to src/newlib/libc/include/time.h).

However, as both you and Angelo get a zero return value, I must look at 
the wrong file.

Tobias

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

