Unless you force the calculation to be done in floats, it will be an integer calculation. Try
cycle_time = ((1.0/frequency)*100000);
Unless you force the calculation to be done in floats, it will be an integer calculation. Try
cycle_time = ((1.0/frequency)*100000);