Capturing a time in milliseconds
To have millisecond precision you have to use system calls specific to your OS. In Linux you can use #include <sys/time.h> timeval tv; gettimeofday(&tv, 0); // then convert struct tv to your needed ms precision timeval has microsecond precision. In Windows you can use: #include <Windows.h> SYSTEMTIME st; GetSystemTime(&st); // then convert st to your … Read more