Add ability to use a function as the `durationTime`