Respect passed buffer parameter in calculating duration.

--BRJ