Try this code Bob. I even get the right loop counts, but no delay.

by Clippy (Login burger2227)
R

 

DECLARE SUB SNOOZE (snoozeTime)
DECLARE SUB snoozeTimer ()
DIM SHARED snoozeTiming AS DOUBLE

snoozeTimer

PRINT snoozeTiming
k$ = INPUT$(1)

SNOOZE 5

SUB SNOOZE (snoozeTime)
FOR snoozeRate = snoozeTiming * snoozeTime TO 0 STEP -1
x# = x# + 1
NEXT snoozeRate&
PRINT x#
END SUB

SUB snoozeTimer
snoozeTiming = 0
snoozePoint$ = TIME$
WHILE TIME$ = snoozePoint$
WEND
snoozePoint$ = TIME$
WHILE TIME$ = snoozePoint$
snoozeTiming = snoozeTiming + 1
WEND
END SUB

I get absolutely NO delay EVER. I know it isn't that bad!



    
This message has been edited by burger2227 on Nov 20, 2010 2:47 PM

Posted on Nov 20, 2010, 2:24 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
I assume you're running it in QB64... on Nov 20
 Alright, I added one line of code -- try this in QB64... on Nov 20
  It works BETTER in QB64 than Qbasic on my XP.Clippy on Nov 20
   *Yeah, in QB/DOSBox loops are slo-o-ow, which is why it "sort of" worked there. on Nov 21
    CPU Speed can be adjusted in DOSBox on Nov 21
     Well, I never heard of a TIMER that didn't reset at midnite either.Clippy on Nov 21
      DOSBox is weird that way... on Nov 21
       Well I have DOSBOX, but I'm not planning on making a habit of it.Clippy on Nov 21
      It resets to the actual time when I start DOSBox on Nov 21

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement