Re: I hate timers!
If the language your using provides it, a simple call to C's time()*1000 would also be sufficient. However, that has its drawbacks, such as the time being moved back several hours, causing nasty surprises. A good idea is to use a monotonic clock. A monotonic clock is a clock that always moves forward and never backwards. It can't be altered or changed. A monotonic clock works by taking an initial value (such as the time your system booted) and uses that as its "epoch". C has its clock_gettime() function in POSIX and GEtTickCount64()/QueryPerformanceCounter() for win32, C++ has std::chrono::steady_clock, Python has time.monotonic(), C# provides System.Threading.Timer, and so on.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector