Use a function as `durationTime`