change time parameter from int to float