# I added a time left/time elapsed display to waithax

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

# I added a time left/time elapsed display to waithax

1,366 Views
1. ### shchmueGBAtemp Regular

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

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

Here it is running:

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:

• ###### waithax.zip
File size:
83.9 KB
Views:
34
Last edited by shchmue, Dec 26, 2016
pandavova, PF2M, zeldaism and 8 others like this.

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

3. ### gnmmarechalGBAtemp Guru

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

Our Patreon
Jul 13, 2014
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. ### shchmueGBAtemp Regular

Member
2
Dec 23, 2013
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.

Member
9
Dec 29, 2015
127.0.0.1
Makes sense I use similar code too

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

anyway, now implemented in latest build, thanks @shchmue

Xiphiidae and gnmmarechal like this.

Member
9
Dec 29, 2015
127.0.0.1
That comment aint any more contributing lmao

VinsCool likes this.

Member
10
Oct 17, 2015
for sure but i don't care

iAqua and zoogie like this.