: : I want to know how to put a timer like a game timer in my game made in c
: : please give me a concrete example...
: depends on the OS. If you are writing for MS-DOS 6.X, then you will have to hook into the clock interrupt vector and probably use assembly language. In Windows, create another thread and use Sleep() to create the affect of a timer. I suppose you would do something similar with unix.
In Windows it is not necessary to create another thread. It depends on the timerresolution to choose the method:
- GetTickCount() or time()
the resolution should be ms but it isnt ...
- QueryPerformanceCounter() uses some processorstuff ..
use that if you need a _high_ resolution timer