Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/14/04 08:52
Read: times


 
#70326 - RE: INFO: RS485 and Win9X RTS toggle option
Responding to: ???'s previous message
Hi Kiran,

Please know that I am by no means a great Windows expert nor do I have any affiliation with Microsoft. It's just that I think that putting the blame on an easy and popular target like Windows (98!!!!) is not going to bring any solution to anybody.
Seeing the reaction from others, Windows Bashing is quite a popular sport, so I decided I didn't have much to add. But if you insist, here i go again :)

The method sleep() you mention is not for exact timing purposes, and nor does Microsoft claim so. In fact, if you would bother to look it up on MSDN, you will find that all it does id SUSPEND the current thread for A MINIMUM OF the specified number of milliseconds:

http://msdn.microsoft.com/library/d.../sleep.asp

There is no mystery there. It is best to RTFM before making assumptions as to whether a product is wrong or if your expectations of the product are wrong. Examples of exactly this we see on this board many times a day, in different forms.

So how many ms your thread will be suspended exactly will depend on other threads, their priorities, AND on the granularity of timeslicing, which I don't know how many ms that is ecactly, but I wouldn't be at all surprised if that would be near 50ms (you could actually change the granularity of Windows to improve the performance of sleep(), but you would still be using it for a purpose it is not intended for).

If you want accurate timing from a Windows machine, there are third party API's available which can help you, but to my knowledge none are included with Windows by default.


List of 42 messages in thread
TopicAuthorDate
INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
   RE: INFO: RS485 and Win9X RTS toggle opt            01/01/70 00:00      
      RE: INFO: RS485 and Win9X RTS toggle opt            01/01/70 00:00      
         RE: INFO: RS485 and Win9X RTS toggle opt            01/01/70 00:00      
            RE: INFO: RS485 and Win9X RTS toggle opt            01/01/70 00:00      
   RE: INFO: RS485 and Win9X RTS toggle opt            01/01/70 00:00      
   another microsoft bug: delay (50)            01/01/70 00:00      
      RE: another microsoft bug: delay (50)            01/01/70 00:00      
         RE: another microsoft bug: delay (50)            01/01/70 00:00      
         RE: another microsoft bug: delay (50)            01/01/70 00:00      
         RE: another microsoft bug: delay (50)            01/01/70 00:00      
         ....Post No.2.            01/01/70 00:00      
         ...Post No.3            01/01/70 00:00      
         To Hans Van Pelt            01/01/70 00:00      
      RE: another microsoft bug: delay (50)            01/01/70 00:00      
   RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
   ...Post No.4            01/01/70 00:00      
   RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
      RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
         RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
            RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
               4 wire RS485            01/01/70 00:00      
                  RE: 4 wire RS485            01/01/70 00:00      
                     RE: 4 wire RS485            01/01/70 00:00      
                        RE: 4 wire RS485            01/01/70 00:00      
                  RE: 4 wire RS485            01/01/70 00:00      
   4 wire 'rs485'            01/01/70 00:00      
      RE: 4 wire \\\'rs485\\\'            01/01/70 00:00      
         RE: 4 wire 'rs485'            01/01/70 00:00      
         RE: 4 wire \\\'rs485\\\'            01/01/70 00:00      
            RE: 4 wire \\\'rs485\\\'            01/01/70 00:00      
               RE: 4 wire \\\'rs485\\\'            01/01/70 00:00      
            Jacob & Erik - where's the evidence?            01/01/70 00:00      
               RE: Jacob & Erik - where's the evidence?            01/01/70 00:00      
   RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
      RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
         RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
            RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
               RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
                  RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
         RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      
   RE: INFO: RS485 and Win9X RTS toggle option            01/01/70 00:00      

Back to Subject List