Fix a bug with floating-point time duration