I need to divide an integer by a long long variable (mslong in the following code), however it always produces zero as the result (ss will be out as zero). How can I tackle this problem?
int xm = 100;
int ym = 50;
int dist_m = sqrt(xm*xm + ym*ym);
struct timeval tp;
gettimeofday(&tp, NULL);
long long mslong = (long long) tp.tv_sec * 1000L + tp.tv_usec / 1000;