home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / wizards / 5354 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  2.1 KB

  1. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
  2. From: torek@horse.ee.lbl.gov (Chris Torek)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: Does Unix Guarantee Limits on Delays
  5. Date: 31 Dec 1992 23:51:32 GMT
  6. Organization: Lawrence Berkeley Laboratory, Berkeley CA
  7. Lines: 35
  8. Message-ID: <28187@dog.ee.lbl.gov>
  9. References: <AJ3U.92Dec25152444@larch.cs.virginia.edu>
  10. NNTP-Posting-Host: 128.3.112.15
  11.  
  12. In article <AJ3U.92Dec25152444@larch.cs.virginia.edu>
  13. aj3u@larch.cs.virginia.edu (Asim Jalis) writes:
  14.  
  15. >Distribution: comp
  16.  
  17. (Note: `comp' is not a distribution; it is part of a newsgroup name.  If
  18. your news reader inserts this automatically, bring that to the attention
  19. of your news administrator.)
  20.  
  21. >The problem that I am working with is this.  I want to time the
  22. >interval between the occurrence of two mouse events. ...
  23. >Does Unix guarantee, either explicitly, or implicitly through the
  24. >way it is designed, that a call to the clock daemon will return
  25. >within a certain fixed upper limit amount of time?
  26.  
  27. It is not at all clear what you mean by `a call to the clock daemon'.
  28. Moreover, depending on where these times are sampled, and by what
  29. (hardware or software) there could be an arbitrarily large error.  You
  30. will get the best results by having the mouse hardware generate its own
  31. time stamps, to be included with the mouse event data as sent from the
  32. mouse to the receiver (memory, cpu, serial port, whatever).  The next
  33. best timing will arise from sampling the actual time (e.g., using
  34. microtime() under BSD or uniqtime() under SunOS) in the code that is
  35. closest to the `mouse event'.  Typically this is in the interrupt
  36. handler for the mouse.
  37.  
  38. If you are attempting to measure times from user code, the error (and
  39. the variance in samples) will increase.  Different UNIX systems make
  40. different guarantees (or lack(s) thereof) in response times, both to
  41. interrupts (if indeed they use interrupts at all) and to running user
  42. programs.  For such information, you will have to consult directly with
  43. your vendor.
  44. -- 
  45. In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
  46. Berkeley, CA        Domain:    torek@ee.lbl.gov
  47.