cast duration to float