fixed probable timing bug in timer functions; documentation