Added computation of frame duration.