TIME$ is given automatically .......

by Clippy (no login)

 

clock$ = TIME$ 'returns military time as a string EX: "12:05:22"
hour$ = LEFT$(TIME$, 2) ' "12" in example
min$ = MID$(TIME$, 4, 2) ' "05" in example
sec$ = RIGHT$(TIME$, 2) ' "22" in example

To use the TIME$ as a second counter you just wait for a change in sec$:

DO: sec$ = RIGHT$(TIME$, 2)

IF RIGHT$(TIME$, 2) < sec$ THEN count = count + 1 <br>
LOOP UNTIL count = 10

The only problem with using TIME$ is that it will lag when Windows puts the program in the task bar.



Posted on Jul 29, 2009, 10:10 PM

Respond to this message   

Goto Forum Home

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

Quantcast