Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Wiimote Project » General Wiimote and Technology » Programmers Den » Timing issue: Using VB Timers and WiiMotLibrary at the same time
Pages: [1]
  Print  
Author Topic: Timing issue: Using VB Timers and WiiMotLibrary at the same time  (Read 2530 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +0/-0
Posts: 4
Offline Offline
View Profile
« on: April 07, 2009, 05:52:12 PM »

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
« Last Edit: April 08, 2009, 03:08:54 PM by tkj » Logged
*
Karma: +0/-0
Posts: 4
Offline Offline
View Profile
« Reply #1 on: May 01, 2009, 08:32:14 PM »

Anyone??
Logged
Support Admin
*
Karma: +49/-0
Posts: 1178
Offline Offline
benpaddlejones@live.com.au View Profile WWW Email
« Reply #2 on: May 02, 2009, 06:37:58 AM »

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

benpaddlejones Smiley
Logged


See my full profile and links on my Google Profile: http://www.google.com/profiles/benpaddlejones
*
Karma: +0/-0
Posts: 35
Offline Offline
iWiiBoard
View Profile WWW
« Reply #3 on: December 08, 2009, 04:41:46 AM »

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
 Cheesy
Logged

Pages: [1]
  Print  
 
Jump to:  

Clicky Web Analytics