quartz: Fix checking for duration.