Image

Imagealiversion2_0 wrote in Imagecpp

why does this return an integer?

int main(){
clock_t end_loop, start_loop;
double trip_time;

trip_time = (static_cast (end_loop) - static_cast (start_loop))/1000;

cout << "time=" << trip_time << endl;
return 0;
}

EDIT: Let me clarify. I know it's not supposed to return an integer, but nevertheless I cannot get a result with a fractional result; therefore, it seems to be outputting an integer.