# SpeedTimer Large Update!



## CoderGuru (Jun 20, 2021)

Hi Cubers,

I have just posted a large update to SpeedTimer upgrading it to beta v0.1.0.

Check it out at speedtimer.xyz
For any suggestions please feel free to add them here or email [email protected].

Updates Include:


Added Full Mobile Support
Scramble Visualiser
Added All OLL Algorithms
Added All 2LPLL Algorithms
Added All 2LOLL Algorithms
Fixed Timer and Synced with Date for Accuracy(Made Faster)
More Settings
Wait Time on Space Bar
Added Export Option
Removed Minor Lag
Small UI Fixes for Bettter Overall Site Look

Thanks!


----------



## the dnf master (Jun 25, 2021)

I still got a scramble starting with L R' L2


----------



## CoderGuru (Jun 25, 2021)

the dnf master said:


> I still got a scramble starting with L R' L2


I'm still working on WCA scrambles


----------



## gruuby (Aug 21, 2021)

I was using this timer and instead of getting a 16.00 I got a 15.100 lol.


----------



## xyzzy (Aug 21, 2021)

Nuuk cuber said:


> I was using this timer and instead of getting a 16.00 I got a 15.100 lol.


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:

```
function increment(start) {
	advance = setInterval(function () {
		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;
		} else clearInterval(advance);
	});
}
```

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.

---

Also also also, bad scramble generation. :/

17 moves is much too few for random-move scrambles. Make the scrambles at least 25 moves long, or use a proper scramble generator. In fact, the scrambles are too short for _all_ the n×n×ns.


----------



## Ninjascoccer (Dec 12, 2021)

CoderGuru said:


> Added All 2LPLL Algorithms


You might wanna check the Algs because in the 2LPLL section, Ua and h perm pictures are swapped.


----------

