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