I do not think it will have any big advantage over the adc_read function,which you are currently using in your program.I think you should test your code,by running it on a system.That way,you can know whether you should keep the code as it is or change it.
Well i have tested the above code in a buck converter.Below are my observations over approximately 10 trials
observation-1
1) i am getting 15 v output as against 16 v which is desired but i am not getting any pulses from the mikro or the oscilloscope is nt showing.
observation-2
1) when i am opening the loop i.e. the input voltage to the buck converter is switched off, i should get pulses as set in the code before the while loop.But, i am getting a pulses which is completely different than the one set in the code