use time interval instead of frame