Calculate current frame based on time for better precision