Fixed timing issues, tested

should now sleep efficiently and poll RTC to keep good time