I am writing a code in c and I need to add milliseconds to the current time So far, i have :
current_time = time(NULL); loc_time=localtime(¤t_time);
however this only gives HH:MM:SS when I need HH:MM:SS:MM
Say the local time is 20:00:00:10. I want to adding 10 milliseconds 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 of type int format and, to add milli seconds I will have to add .001 seconds to the current second which is not an int.