Author Topic: Timing issue: Using VB Timers and WiiMotLibrary at the same time  (Read 5154 times)

Offline tkj

  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
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, 06:08:54 AM by tkj »



Offline tkj

  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Anyone??



Offline benpaddlejones

  • Support Admin
  • *
  • Posts: 1178
  • Karma: +49/-0
    • View Profile
    • Inter.Connect.Ed
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


Offline RonnieJi

  • *
  • Posts: 35
  • Karma: +0/-0
  • iWiiBoard
    • View Profile
    • Wiimote Whiteboard/Wii Whiteboard
Reply #3 on: 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