This task is very important for erlyvideo, because video frames must arrive according to real time. http://github.com/erlyvideo/erlyvideo/blob/master/src/media/media_ticker.erl#L183 This is how I've solved it. We take wall clock on start and then on each cycle we calculate how much should we sleep.