delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/04/11/15:14:19

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: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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT net-b DOT 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 AT cygwin DOT com, fortran AT gcc DOT gnu DOT org
Subject: Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0
References: <5166A0B3 DOT 70801 AT net-b DOT de> <5166BCA1 DOT 5040204 AT net-b DOT de> <20130411134835 DOT GD18333 AT calimero DOT vinschen DOT de>
In-Reply-To: <20130411134835.GD18333@calimero.vinschen.de>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019