| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Borland C++ (Os/2) |
Hello Murray! In a message written on Wednesday May 17 1995, Murray Lesser insanely babbles to Paul Sidorsky: ML> The DOS system clock (the PC timer counter) "ticks" (is updated) ML> about 18.2065 times per second (actually 1,573,040 ticks before ML> rollover, which is every 86,400 seconds, assuming the clock is ML> accurate). The OS/2 system clock (the "real-time clock") "ticks" ML> exactly 31.25 times per second (same assumption). These "tick rates" ML> indicate only the granularity of the system clock readings--an ML> indication of the significance of the value of a time interval measured ML> by two readings of the system clock (same assumption). We were actually discussing this in OS2DOORS a while back. The thing I'm wondering is how you get, say, the 1/10000th of a second precision timings you see in Turbo Profiler for DOS. From what I know the computer has a timing "port" that you can configure to time up to something like 1/100000th of a second. I can only assume that this port doesn't use the system clock, but if that's the case then what _does_ it use? Or are times not as accurate as they appear to be? ML> Perhaps you misunderstood the meaning of the value given in your ML> OS/2 C compiler's time.h header for CLOCKS_PER_SECOND. This value is an ML> artifact of the clock() function implementation in that particular ML> language processor, and has nothing to do with the actual system clock ML> tick rate. A couple of examples from DOS C compilers I have owned: The ML> MSC DOS C compiler v 5.1 used a value of 1000 for CLOCKS_PER_SECOND by ML> computing the system clock time from the PC timer counter value to the ML> nearest millisecond each time the program called for a value of clock(). I see. I don't know very much about the hardware goings-on, so I usually only guess at that kind of stuff. One of these days I'll sit down and learn all this fancy stuff, but until then I'll have to stumble along. ML> On the other hand, the Borland DOS C compiler (v 3.1) effectively ML> counted system clock ticks by using the readings directly from the PC ML> timer counter; CLOCKS_PER_SECOND for that compiler is given as 18.2. It's called CLK_TCK in BC++ actually. :-) ML> In any case, the system clock tick interval has nothing to do with ML> how fast the display screen is rewritten. Well, it was a logical deduction from the facts I had, but when I don't have all the facts it's hard to get it right. :-) Thanks for correcting me. -- PaulS --- FMail/386 1.0g* Origin: C.R.I.S.I.S. HQ, Calgary AB, (403)686-0449, 28800 V.FC (1:134/31) 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: 134/31 17 3615/50 396/1 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™.