delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/12/11:53:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: GCC G77 Sleep Intrinsic
Date: Fri, 12 Dec 2003 16:52:39 -0000
Message-ID: <CDDF0C56FD28F74CA268185D6EABD63303DA0C83@i2km38-ukdy.domain1.systemhost.net>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: <kevin DOT lawton AT bt DOT com>
To: <lars DOT steinke AT tu-clausthal DOT de>, <cygwin AT cygwin DOT com>
X-OriginalArrivalTime: 12 Dec 2003 16:52:40.0818 (UTC) FILETIME=[5AF40D20:01C3C0D0]
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id hBCGqtJU008247

I would expect that this is an API issue, and therefore the same code (same executable, even ?) will produce the different results under Win 9x compared to Win-NT. Instead of trying to fathom it all out, it might just be easier to 'suck it and see'. 
Quite what other languages with a sleep or wait command do to ensure consistent intervals I am not too sure - maybe they are comparing successive reads of the system clock instead of counting clock ticks, or possibly detecting the platform and multiplying/dividing as appropriate. 
Kevin.   
   
| -----Original Message-----
| From: Lars Steinke [mailto:lars DOT steinke AT tu-clausthal DOT de]
| Sent: 12 December 2003 16:06
| To: Lawton,K,Kevin,XJH3C C; cygwin AT cygwin DOT com
| Subject: RE: GCC G77 Sleep Intrinsic
|  
| At 15:03 12.12.03 +0000, you wrote:
| >Sorry to re-post on top of my previous one, but I've had 
| another thought 
| >(on a Friday as well !).
| >Given that the problem has shown on Win 98 SE, but seems 
| okay on Win XP & 
| >2K:   Maybe the clock 'tick' used in the Win 9x API is 
| different to that 
| >used in the Win NT API ?  I don't have access to a Win 9x 
| machine at the 
| >moment, but maybe someone would like to try something like a 'CALL 
| >Sleep(2000)' in G77 under Win9x and see if it waits for 
| around 2 seconds ?
| 
| I did and it waits for around 2 seconds. I also tried (10000) 
| and then it 
| waits for around 10 seconds.
| Seems to be milli-second intervals...
| What will happen if I run this program (compiled on 98) on 
| 2K? Will it 
| waits for 2 seconds or for 2000 ! seconds?
| 
| Lars
| 
| 
| >    This question seems to have stirred some distant memory 
| in the darkest 
| > recesses of my brain, about Win 9x clock ticks being at 
| milli-second 
| > intervals, but those recesses are far too dark to be able 
| to remember 
| > clearly.
| >Kevin.
| >
| >| -----Original Message-----
| >| From: cygwin-owner AT cygwin DOT com
| >| [mailto:cygwin-owner AT cygwin DOT com]On Behalf
| >| Of kevin DOT lawton AT bt DOT com
| >| Sent: 12 December 2003 12:45
| >| To: lars DOT steinke AT tu-clausthal DOT de; cygwin AT cygwin DOT com
| >| Subject: RE: GCC G77 Sleep Intrinsic
| >|
| >| I can confirm that Sleep(n) intrinsic function appears to
| >| work as expected under Windoze 2000 (SP2).
| >| Could test under Win95 OSR2 and Win-Me this weekend if any use.
| >| Kevin.
| >|
| >| | -----Original Message-----
| >| | From: cygwin-owner AT cygwin DOT com
| >| | [mailto:cygwin-owner AT cygwin DOT com]On Behalf
| >| | Of Lars Steinke
| >| | Sent: 12 December 2003 12:25
| >| | To: cygwin AT cygwin DOT com
| >| | Subject: Re: GCC G77 Sleep Intrinsic
| >| |
| >| | On Thursday 11 December 2003 02:14, Lars Steinke wrote:
| >| |  > Hello,
| >| |  >
| >| |  > I am using G77 (cygwin, GCC G77 on Windows 98 SE) and
| >| |  > I have a problem with the following function:
| >| |  >
| >| |  > Sleep Intrinsic
| >| |  > CALL Sleep(Seconds)
| >| |  >
| >| |  > Seconds: INTEGER(KIND=1); scalar; INTENT(IN).
| >| |  >
| >| |  > Intrinsic groups: unix.
| >| |  >
| >| |  > Description:
| >| |  >
| >| |  > Causes the process to pause for Seconds seconds. See sleep(2).
| >| |  >
| >| |  > <http://gcc.gnu.org/onlinedocs/gcc-3.3.2/g77/Sleep->
| >| | Intrinsic.html#Sleep%20Intrinsic>
| >| |  >
| >| |  > If I write:
| >| |  >
| >| |  > CALL Sleep(1)
| >| |  >
| >| |  > in my program and if I compile my program with:
| >| |  >
| >| |  > g77 -o test test.f
| >| |  >
| >| |  > the 'sleep' is so fast that you can not see it.
| >| |  >
| >| | Works fine here on XP. Check the FAQ's to see if C sleep() or
| >| | the Sleep API
| >| | may not be supported on 98.
| >| |
| >| | I did check the FAQ, but without success...
| >| | I am not very adept at cygwin and g77... Can you help me?
| >| |
| >| | Thank you very much!
| >| |
| >| | Lars
| >| |
| >| | --
| >| | Tim Prince
| >| |
| >| | --
| >| | Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| >| | Problem reports: http://cygwin.com/problems.html
| >| | Documentation: http://cygwin.com/docs.html
| >| | FAQ: http://cygwin.com/faq/
| >| |
| >| |
| >| | --
| >| | Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
| >| | Problem reports:       http://cygwin.com/problems.html
| >| | Documentation:         http://cygwin.com/docs.html
| >| | FAQ:                   http://cygwin.com/faq/
| >| |
| >| |
| >|
| >| --
| >| Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
| >| Problem reports:       http://cygwin.com/problems.html
| >| Documentation:         http://cygwin.com/docs.html
| >| FAQ:                   http://cygwin.com/faq/
| >|
| >|
| >
| >--
| >Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
| >Problem reports:       http://cygwin.com/problems.html
| >Documentation:         http://cygwin.com/docs.html
| >FAQ:                   http://cygwin.com/faq/
| 
| 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


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