And yeah, having two separate threads for distance computation and display or doing what Mobius01 said is a good idea.