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: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 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 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 To: cygwin AT cygwin DOT com Subject: Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0 Message-ID: <20130411195025.GI18333@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <51670A56 DOT 6090701 AT alice DOT 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 < > 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