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 Advanced Member

    Newcomer
    63
    36
    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. ShinyMK

    ShinyMK known as @initPRAGMA

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

    gnmmarechal Seriel's Original Stalker

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

    Our Patreon
    4,833
    2,992
    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 Advanced Member

    Newcomer
    63
    36
    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. ShinyMK

    ShinyMK known as @initPRAGMA

    Member
    1,507
    533
    Dec 29, 2015
    127.0.0.1
    Makes sense I use similar code too
     
  6. Mrrraou

    Mrrraou GBAtemp Advanced Maniac

    Member
    1,869
    2,167
    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. ShinyMK

    ShinyMK known as @initPRAGMA

    Member
    1,507
    533
    Dec 29, 2015
    127.0.0.1
    That comment aint any more contributing lmao
     
    VinsCool likes this.
  8. Mrrraou

    Mrrraou GBAtemp Advanced Maniac

    Member
    1,869
    2,167
    Oct 17, 2015
    France
    for sure but i don't care
     
    iAqua and zoogie like this.