I am writing a code in c and I need to add milliseconds to the current time given by :
current_time = time(NULL);
loc_time=localtime(¤t_time);
Say the local time is 20:00:00:10. I want to adding 10 seconds and display it so it displays 20:00:00:20. I am fairly new to c so any help is much appreciated. I am confused as time is in int format and, to add milli seconds I will have to add .001 seconds to the current second which is not an int.