Board index » delphi » Own delay procedure
Marcello Raf
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Marcello Raf
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Own delay procedureHow can I write a own delay procedure to avoid using the crt unit? I'll appreciate any help. /~~\ MARCELLO RAFFA -- ITALY |
Timo Sal
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Own delay procedureIn article <50p7eq$...@server-b.cs.interbusiness.it>, QuoteMarcello Raffa <sra...@eniware.it> wrote: You don't have to: 112582 Aug 16 1994 ftp://garbo.uwasa.fi/pc/ts/tspa3470.zip All the best, Timo .................................................................... |
Poon Wing C
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Own delay procedureI hereby include 2 delay procedures, you may decide which is better. Version 1 (Although CRT is not required, but DOS is required in version 1) Version 2 (Borland Pascal 7.0) from Poon Wing Chi (Hong Kong) In article <50p7eq$...@server-b.cs.interbusiness.it>, sra...@eniware.it (Marcello Raffa) says: Quote
| Please feel free to contact me at: | | b91593%lxhk02.school.net...@hk.net | | astronet!poon.wing....@hk.super.net | | Please have a view of my homepage at: | | http://lxhk02.school.net.hk/~b91593/ | | Telephone Number : (852) 23562172 | ============================================= |
Dr John Stockto
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Own delay procedureIn article <50sc2l$...@ecs2.school.net.hk> of Sat, 7 Sep 1996 17:40:37 Quote> ... hence, once an hour, when Now reaches a multiple of 2^16, there is a (small) chance that the value obtained will be inconsistent. Also, one can calculate the end value (Prev+Num) before entering the loop, thus waiting faster. Also, 24*60*60*10*182 should be (24*60*60*182) div 10 (but the clock is actually a bit faster than 18.2; the constant should be $00180000 plus about $180 I think). Note that the routine by me in Timo's Pascal FAQ, #67, A2, has the non-atomic defect. I have a delay routine which loops counting CHANGES in the byte at procedure WaitTix(Tix : shortint) {MSDOS/DPMI} ; I'll put more in the URL below, before long I hope. |
Frank Heckenba
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Own delay procedureQuotesra...@eniware.it (Marcello Raffa) writes: done in words, and overflow (except from 0:00 to about 0:11). Quote> Version 2 (Borland Pascal 7.0) (because of "absolute $40:...") Quote> If Now < Prev then Dec(Prev,(24 * 60 * 60 * 10 * 182)); For a resolution of 1/18.2s (55ms), these routines are fine. However, if you Hope this helps, |