Android Question timers lag

Discussion in 'Android Questions' started by eric Allen, Apr 9, 2015.

  1. eric Allen

    eric Allen Member Licensed User

    What would be the best way to get correct time elapsed in between ticks to get correct milliseconds

    In game view I use timer for gameloop but for any game time a timer us either slow or fast. Could I compare an old time form system and new time from system and get the millisecond difference. Might of answeredy own post butvwant to know if that's the correct way.
    Last edited: Apr 9, 2015
    RandomCoder likes this.
  2. DonManfred

    DonManfred Expert Licensed User

    Sub Globals
    'These global variables will be redeclared each time the activity is created.
        'These variables can only be accessed from this module.
        Dim endtime, starttime As Long
    End Sub
    Sub Activity_Create(FirstTime As Boolean)
      starttime = 
    and then when you finished

    endtime = DateTime.Now
    Dim diff As Long = endtime-starttime
    lemonisdead and mangojack like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice