I added a time left/time elapsed display to waithax

Discussion in '3DS - Homebrew Development and Emulators' started by shchmue, Dec 26, 2016.

  1. shchmue
    OP

    shchmue GBAtemp Regular

    Member
    2
    Dec 23, 2013
    United States
    edit: hooray Mrrraou implemented it and added a message that tells you whether you're getting O3DS or N3DS speed :D https://github.com/Mrrraou/waithax/releases/latest

    Here's the source for my version: https://github.com/shchmue/waithax

    Here it is running:
    [​IMG]

    Thanks to @Mrrraou for advice on this and for making the awesome tool waithax itself.

    Thanks to everyone in #3dsdev who helped me fix my noob problems with how I was displaying the timer that messed up the hax itself lul
     

    Attached Files:

    Last edited by shchmue, Dec 26, 2016
    pandavova, PF2M, zeldaism and 8 others like this.
  2. PRAGMA

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    How does it calculate this? Some kind of complex Logic?
     
  3. gnmmarechal

    gnmmarechal GBAtemp Guru

    Member
    12
    GBAtemp Patron
    gnmmarechal is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 13, 2014
    Portugal
    https://gs2012.xyz
    iirc, it's an approximation, correct?
    I suppose it counts how much one cycle takes on avg then multiplies it by the number of cycles not taken yet?
     
  4. shchmue
    OP

    shchmue GBAtemp Regular

    Member
    2
    Dec 23, 2013
    United States
    It just keeps track of how long it's been running and estimates time remaining based on that and the number of iterations remaining
    Code:
    timeLeft = timeElapsed * iterationsLeft / iterationsDone
    In the code it's actually
    Code:
    timeLeft = timeElapsed * (iterationsTotal / iterationsDone - 1)
    which is the simpler mathematical form of
    Code:
    timeLeft = timeElapsed * (iterationsTotal - iterationsDone)/ iterationsDone
    because
    Code:
    iterationsTotal - iterationsDone == iterationsRemaining
     
    piterayo and gnmmarechal like this.
  5. PRAGMA

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    Makes sense I use similar code too
     
  6. Mrrraou

    Mrrraou GBAtemp Advanced Maniac

    Member
    10
    Oct 17, 2015
    France
    wow thanks for your comment that contributed to discussion


    anyway, now implemented in latest build, thanks @shchmue :)
     
    Xiphiidae and gnmmarechal like this.
  7. PRAGMA

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    That comment aint any more contributing lmao
     
    VinsCool likes this.
  8. Mrrraou

    Mrrraou GBAtemp Advanced Maniac

    Member
    10
    Oct 17, 2015
    France
    for sure but i don't care
     
    iAqua and zoogie 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