# New Cubing Timer Website - SpeedTimer!

#### Flowkap

##### Member
I normally would but my parents aren’t on board with that as they want it to be a solo project. Sorry
Sorry of I ask, but you're 21, developing this software and your parents decide? To me that's a bit weird to be honest.

#### CoderGuru

##### Member
Oh I'm not 21, im 13 I am just used to putting random dates into websites.

#### xyzzy

##### Member
This hasn't been fully fixed yet, btw:
I didn't even see this post until after I tried out the timer and hit the exact same issue, lol.

The problematic piece of code:
JavaScript:
function increment(start) {
timer.style.color = "white";
if (running == 1) {
time = Date.now() - start;
var mins = Math.floor(time / 1000 / 60);
if (mins <= 9) {
mins = "0" + mins;
}
var secs = Math.floor(time / 1000 % 60);
if (secs <= 9) {
secs = "0" + secs;
}

var hundredths = Math.round(time % 1000 / 10);
if (hundredths <= 9) {
hundredths = "0" + hundredths;
}

timer.innerHTML = mins + ":" + secs + "." + hundredths;
});
}

You cannot safely do round-to-nearest (Math.round) on individual components of the time; you have to round the time to centiseconds first, then compute the minutes/seconds/hundredths components from there. (It actually also "works" to replace the Math.round with Math.floor (round to minus infinity), but this causes a −0.005 bias. Then again, flooring also matches WCA regs on how to handle rounding, so pick your poison.)

Also also, use performance.now() instead of Date.now() when measuring elapsed time. Guaranteed monotonic clock (it doesn't care about system clock adjustments) and doesn't (shouldn't) break in the presence of leap seconds.

(Although I do see that you're using performance.now instead of Date.now now.)

#### CoderGuru

##### Member
It seems to work on any other device except my computer. (Chrome) Weird.
Oh. Sorry about that. I hope you can find an alternative way to use it

#### Mo_A2244

##### Member
New to this thread and would just like to say this timer is actually pretty good. I mainly use timers for the art style instead of the stats to be honest and this art style is right up my street, reminding me of CubeDesk. To be doing this at 13 is pretty cool too. Keep up the good work

#### cuber314159

##### Member
Oh. Sorry about that. I hope you can find an alternative way to use it
Just to let you know that I tried to using speedtimer in the 10 unboxing videos I filmed on Thursday that I will upload over the next week or so, unfortunately for most of them there were still issues, I apologize if I put a bad light on it in the QiYi MP 2x2 and 3x3 reviews where it doesn't stop properly and sometimes the scramble doesnt come up. It seems that on my tablet it requires a hard tap to stop whereas other timers can stop with a light tap.

#### CoderGuru

##### Member
Could you give a bit more info on your tablet? I have a tablet and an iPad and speedtimer works flawlessly on them both.

#### Ninjascoccer

##### Member
I have a suggestion,
In my iPad when I time myself, I like to hold down the time button and release when I’m ready. But, inside speedtime, I can’t do that, I just highlight the text. But in cstimer, it works just fine. Can you fix this?

#### Ninjascoccer

##### Member
Also can you make the alg trainers coloured?

#### CoderGuru

##### Member
I have a suggestion,
In my iPad when I time myself, I like to hold down the time button and release when I’m ready. But, inside speedtime, I can’t do that, I just highlight the text. But in cstimer, it works just fine. Can you fix this?
Ill try - thanks for the suggestion

#### CoderGuru

##### Member
The PLL recognition "game" is a good idea, but I don't think it was implemented well. It would be far better to have the images be colored like an actual cube rather than having the arrows. No one actually recognizes PLL by looking at which pieces swap to where, and beginners should not be misled into thinking that they should. Particularly for G perms, it's in my opinion ridiculous to try to recognize based on the swap arrows and not patterns like bars, headlights, opposites, etc.
Would something like this be ok?