I've searched the topic on google and this website, but i could not find the exact answer what i was looking for.
For a certain scenario in my application (timestamps related) i need time in milliseconds. What i am currently doing is to get time in seconds using time() function and convert it into milliseconds by multiplying it with 1000.
But the problem is that time_t is signed long (32 bit). When i multiply time_in_seconds with 1000, it overflows 32 bits and the resulting time in milliseconds becomes -ve.
Please tell me how can i get time in milliseconds ? Also, i don't want processor time taken, i want wallclock time.