I\'ve searched in the Web but I\'ve only found a way for do it, but in this way it returns in seconds instead of milliseconds.
My code is:
#include
This code piece works. This is based on the answer from Angus Comber:
#include
uint64_t system_current_time_millis()
{
#if defined(_WIN32) || defined(_WIN64)
struct _timeb timebuffer;
_ftime(&timebuffer);
return (uint64_t)(((timebuffer.time * 1000) + timebuffer.millitm));
#else
struct timeb timebuffer;
ftime(&timebuffer);
return (uint64_t)(((timebuffer.time * 1000) + timebuffer.millitm));
#endif
}