public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: pthread_cond_timedwait accurate to one second only
@ 2003-08-26 11:06 Thomas Pfaff
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Pfaff @ 2003-08-26 11:06 UTC (permalink / raw)
  To: peter garrone; +Cc: cygwin

 > I would like to use this function down to 10 milliseconds accuracy if 
 > possible.
 > However upon looking at winsup/cygwin/thread.cc,
 > it uses the function "ftime" and the millisecond field is ignored.

This is already fixed. Try the snapshot.
Bit do not expect that you can use it with 10 ms delays. Windows is not 
a realtime system.

Thomas


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: pthread_cond_timedwait accurate to one second only
  2003-08-25 10:01 peter garrone
@ 2003-08-25 18:52 ` Hannu E K Nevalainen (garbage mail)
  0 siblings, 0 replies; 4+ messages in thread
From: Hannu E K Nevalainen (garbage mail) @ 2003-08-25 18:52 UTC (permalink / raw)
  To: cygwin

> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of peter garrone

> I would like to use this function down to 10 milliseconds
> accuracy if possible.
> However upon looking at winsup/cygwin/thread.cc,
> it uses the function "ftime" and the millisecond field is ignored.
>
> All the examples in the winsup testsuite also generally check to
> 5 seconds only.
>
> Is there any inherent reason why finer timing would not work?

In general; You're asking for RTOS granularity from a desktop OS.

Desktop OS'es in general allows that accuracy only in theoretical terms.
This might very well be the sole reason.

Expect even less accuracy from Cygwin; because it is a partly emulated
environment. NOTE: not saying to which degree here... I simply do not know.

/Hannu E K Nevalainen, B.Sc. EE Microcomputer systems - 59°16.37'N,
17°12.60'E
--END OF MESSAGE--


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pthread_cond_timedwait accurate to one second only
@ 2003-08-25 15:51 Timothy C Prince
  0 siblings, 0 replies; 4+ messages in thread
From: Timothy C Prince @ 2003-08-25 15:51 UTC (permalink / raw)
  To: pgarrone; +Cc: cygwin



-----Original Message-----
From: "peter garrone" <pgarrone@linuxmail.org>
To: cygwin@cygwin.com
Date: Mon, 25 Aug 2003 15:42:52 +0800
Subject: pthread_cond_timedwait accurate to one second only

Hi.
I would like to use this function down to 10 milliseconds accuracy if possible.
However upon looking at winsup/cygwin/thread.cc, 
it uses the function "ftime" and the millisecond field is ignored.

All the examples in the winsup testsuite also generally check to 5 seconds only.

Is there any inherent reason why finer timing would not work?
_____________________________________________________
In order to avoid going to newlib and implementing Windows GetLocalTime() calls in gettimeofday(), we made the -mwin32 build option invoke the API milliseconds call directly in the g77 runtime libf2c/libU77/datetime_.c.  I think the "inherent reason" is the perceived awkwardness in making <sys/time.h> library calls pick up milliseconds on Windows, while leaving the lower order part of the microseconds field undetermined.  My documentation on ftime() says it is obsoleted by gettimeofday().
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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* pthread_cond_timedwait accurate to one second only
@ 2003-08-25 10:01 peter garrone
  2003-08-25 18:52 ` Hannu E K Nevalainen (garbage mail)
  0 siblings, 1 reply; 4+ messages in thread
From: peter garrone @ 2003-08-25 10:01 UTC (permalink / raw)
  To: cygwin

Hi.
I would like to use this function down to 10 milliseconds accuracy if possible.
However upon looking at winsup/cygwin/thread.cc, 
it uses the function "ftime" and the millisecond field is ignored.

All the examples in the winsup testsuite also generally check to 5 seconds only.

Is there any inherent reason why finer timing would not work?
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-26  7:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-26 11:06 pthread_cond_timedwait accurate to one second only Thomas Pfaff
  -- strict thread matches above, loose matches on Subject: below --
2003-08-25 15:51 Timothy C Prince
2003-08-25 10:01 peter garrone
2003-08-25 18:52 ` Hannu E K Nevalainen (garbage mail)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).