Converting frequency to time (SOLVED)

Both cycle_time and frequency are int. As the cycle time is in microseconds, going into nanoseconds is unnecessary. In my original post, I said double when I meant unsigned long. That has now been corrected.