|
-
Jun 9th, 2000, 02:09 AM
#1
Thread Starter
Addicted Member
Any better/more acurate way to keep track of time in VB than a timer control? It'd be nice to be able to track time intervals less than a second with some degree of accuracy.
Eiredrake
-
Jun 9th, 2000, 02:21 AM
#2
Use the QueryPerformanceCounter API. I think it's accurate up to 1 microsecond (1 millionth of a second).
-
Jun 9th, 2000, 03:02 AM
#3
If you don't need that accurate, you can also use TWO timers. It still aren't so fast it should be, but much faster than with only one.
This works atleast with VB4 (I've used the trick in my slot machine game named Merrysoft Jackpot).
-
Jun 9th, 2000, 06:25 AM
#4
Or just use GetTickCount which is most common because it is accurate up to 1ms.
-
Jun 9th, 2000, 06:35 AM
#5
transcendental analytic
Gettickcount api solves most problems it's accurate to 1ms and with iterating loops with doevents you make your timers executing with different intervals
Heres an example at:
http://forums.vb-world.net/showthrea...threadid=18669
Also, here's some results using different timers:
http://forums.vb-world.net/showthrea...threadid=18440
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|