| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Tiny Clock Ticks |
Excerpted from message dated 05-23-95, Paul Sidorsky to Murray Lesser:
PS>One related question - how accurate are the delay/wait times passed
>to the OS/2 API functions, such as DosSleep() and the
>DosWait...Sem() functions? If they're accurate to the millisecond,
>then there logically should be some way to time to at least the
>millisecond level without a device driver.
Hello Paul--
The "times passed to" are very accurate ;
"times returned from"
are not quite so. I quote from the "Remarks" for DosSleep (and a couple
of related API descriptions) in the Warp "Control Program Programming
Reference":
Time intervals for DosSleep, DosAsyncTimer, and DosStartTimer are
specified in milliseconds; however, it is important to recognize
that the actual time interval will be affected by two factors...
Because clock ticks are less precise than millisecond values, any
time specified in milliseconds will be rounded up to the next
clock tick.
...[B]ecause the system is a priority-based multitasking operating
system, there is no guarantee that a thread will resume
immediately after the timer interval expires.
As far as [apparent] timing to the millisecond under DOS is
concerned, there is the same clock-tick problem for reported timings in
DOS (when using the DOS API [INT 21H] functions) as in OS/2; but the
clock ticks in DOS are a little further apart! Roughly 55ms instead of
31.25ms. Don't believe everything you see on a display screen!
PS>Thanks again for the info.
You're welcome.
--Murray
___
* MR/2 2.23 #120 * Watching for speed bumps on the Information Highwy
---
* Origin: 2" x 4" bbs - a basic board - (914) 271-9407 (1:2625/108)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 2625/108 1 261/1023 270/101 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.