Method for calculating a value for N depending on CPU speed

Feel free to merge this if you think it adds value.