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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=WKIJQff4FLdYVXboWJ0b0r72laYjp1/jPVWvseES1EjKsr2YZZcQU
	sjJsaYXaVR0lBcAlCYwPy74mESP8LDwZ82Wqdl4N9ac+1R5GXmTEUojiXWyi+WhB
	WSyh2j8MPIAWyGtgNzL0nOwLatGMXV/lSTWyHO62cHHpFVAGzUiL1Y=
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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=tgeFAaULoDskwgg1O/xP/naUq2w=; b=duSnt5WFU3aI1v6IDUrDrzJfICFP
	LTuffxIeSEE39WMVepV6kgy3Yhc6t0Fn3IwzTfkkx+kE/jpc/ZoLgwIEmEmKII7Y
	NXwriBaLTIEhMhd3T0YjMy5pKnUVE3fbkHpTsTdb7bOULFQfpx5JtTIc/G5X/0pN
	Sg2F7n3f/+n1njs=
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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1
Date: Thu, 11 Apr 2013 21:50:25 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0
Message-ID: <20130411195025.GI18333@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <51670A56.6090701@alice.it>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <51670A56.6090701@alice.it>
User-Agent: Mutt/1.5.21 (2010-09-15)

On Apr 11 21:09, Angelo Graziosi wrote:
> Hi mum [1],

:)

> Corinna Vinschen wrote:
> 
> >Works fine for me with the current Cygwin 1.7.17, and the upcoming
> >Cygwin 1.7.18:
> >
> >  $ cat > ct.c <<EOF
> 
> At each run, your test case almost always starts with the same value:
> 
> $ gcc -o ct ct.c
> [...]
> 
> I wonder if this is to be expected...

According to the Cygwin source code, yes.  According to the SUSv4
definition, no.  The timer used for the monotonic clock is inited
to 0 for each process, so while each process uses the same clock,
they all have their own monotonic value.  This is obviously not
how the monotonic system clock is supposed to work, so that's a bug
in Cygwin.

I fixed that in CVS.


Mum

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

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

