Fixed bad generic clock max_ticks calculation. Tweaked how many need_ticks uses the cpu in each main loop. It's more precise now and floats around the 100% of speed