use c++ specific static_cast instead

This commit is contained in:
Krishna Vedala
2020-06-03 22:16:14 -04:00
parent 1085bf4301
commit c8a2b1d5b2

View File

@@ -402,7 +402,7 @@ void test3() {
* \returns time difference in seconds
*/
double get_clock_diff(clock_t start_t, clock_t end_t) {
return (double)(end_t - start_t) / (double)CLOCKS_PER_SEC;
return static_cast<double>(end_t - start_t) / CLOCKS_PER_SEC;
}
/** Main function */