Wiimote Project » General Wiimote and Technology » Programmers Den » Timing issue: Using VB Timers and WiiMotLibrary at the same time
: [1]
   
: Timing issue: Using VB Timers and WiiMotLibrary at the same time  ( 3994 )
0 and 1 Guest are viewing this topic.
*
Karma: +0/-0
: 4
Offline Offline
« : April 07, 2009, 08:52:12 AM »

Hi.
I've developed this WiiGun game, but I have a timing issue when i use the Visual Basic timers.
I need to make a counter which count down, with a second delay, but that second isn't a second.

Please take a look at the project/code: http://www.tkjweb.dk/WiiGun.zip

Best Regards
Thomas Jespersen
« : April 08, 2009, 06:08:54 AM tkj »
*
Karma: +0/-0
: 4
Offline Offline
« #1 : May 01, 2009, 11:32:14 AM »

Anyone??
Support Admin
*
Karma: +49/-0
: 1178
Offline Offline
MSN Messenger - benpaddlejones@live.com.au
« #2 : May 01, 2009, 09:37:58 PM »

tkj
Try PM wiiweeyum he might be able to help (I'm a teacher not a programmer).

benpaddlejones :)


See my full profile and links on my Google Profile: http://www.google.com/profiles/benpaddlejones
*
Karma: +0/-0
: 35
Offline Offline
iWiiBoard
« #3 : December 07, 2009, 07:41:46 PM »

I am a visual basic fan too.
You mean miniseconds?
try:

Public Declare Function GetTickCount Lib "kernel32" () As Long '

Public Sub TimeDelay(TT As Long)
Dim t As Long
On Error Resume Next
t = GetTickCount()
Do
DoEvents
If GetTickCount - t < 0 Then t = GetTickCount
Loop Until GetTickCount - t >= TT
End Sub
 :D

: [1]
   
 
:  

Clicky Web Analytics