Man Versus Code

The personal website of Joe Marrero.

Linux TLR Timer Port

After an extensive 4 hour run, I finally realized why my Linux timer class did not work. In the windows version using QueryPerformanceCounter() / QueryPerformanceFrequency(), I stored the time using a float. In the Linux port using clock_gettime() I could not use a float because it overflowed it. I switched to using a double and BAMM it worked. The strange part is on Linux, the overflow manifested itself by showing the same time value over and over again. This did not look like the typical overflow. Below is a screenshot of my Linux development environment.



Pretty cool huh?