|
-
Jan 4th, 2004, 10:05 AM
#1
Thread Starter
Member
-
Jan 4th, 2004, 10:20 AM
#2
Hyperactive Member
What exactly do u want?
VB Code:
Private Declare Function GetTickCount& Lib "kernel32" ()
MsgBox GetTickCount 'Miliseconds since windows was started
Or just Seconds / 1000
There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me
-
Jan 4th, 2004, 10:34 AM
#3
The GetTickCount API does not have a resolution of one ms. Neither do the Timer. If you want that you have to have to use (Can't remember what it is called QuereryPerformance API. THat has a better resolution then GetTickCount
-
Jan 4th, 2004, 11:41 AM
#4
Fanatic Member
Indeed - if you need millisecond or better timing, look at the QueryPerformanceCounter & QueryPerformanceFrequency APIs. The latter gives you the actual resolution, the former lets you do timing.
-
Jan 4th, 2004, 06:38 PM
#5
Unfortunately, after a couple of moderately lengthy discussions about microsecond or higher resolution timing in VB, you really need C/C++ or most likely Assembly to get the job done. Millisecond, though, should work fine with their code.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Jan 4th, 2004, 06:40 PM
#6
the quererieperformanse APIs has a better resolution then 1ms, but not as good as 1(y)s, but I don't think that was the point here either...
-
Jan 4th, 2004, 08:22 PM
#7
I was just (probably over-) covering the topic 
Oh well, I got around 5 hours sleep, so don't mind me.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Jan 5th, 2004, 01:44 AM
#8
5 hours of sleep...I can't remember last time I got that much....
-
Jan 5th, 2004, 03:58 AM
#9
BTW I was thinking of what you said about the QuerrieryPerformance API, I am not sure what is making up the resolution of that API. But it is not VBs fault that you have a that ****ed up resolution on the GetTickCount API. It is your OS fault. Every Win OS has diffrent resolution on that API, and if I guess I think it has to be the same with QuerreryPerformance.
-
Jan 5th, 2004, 04:06 AM
#10
Fanatic Member
I think the resolution of the QPC api depends on the hardware rather than the OS. It's not actually guaranteed to be available, though I'd think any non-ancient pc would have the feature..
btw the resolution of GTC is apparently ~55ms on Win9x..pretty poor really.
-
Jan 5th, 2004, 04:10 AM
#11
Yeah something like that. I don't have MSDN on this LapTop but the resolution is writen if you look it up there. I think it is about 15ms for Win2k...
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
|