Conditions for exact timing

Conditions for exact timing, no more hard coding sleeps.