Original Post
I am writing the server for my project (C++ console app). I already have a cross platform network library, but what I still need is some form of threading library to limit the server to 30 FPS.
I was thinking of the two approaches:
1. Get tick-count after every frame, and sleep the thread until its next time-slot to make 30fps.
2. Use an event driven system where I create a timer that ticks every 1000/30 ms.
Could anyone suggest a library that is as lightweight as possible to fulfill my needs? Or perhaps, with method 1, I dont even need a library, i could simply IFDEF the sleep and tick-count commands? (I dont know much about linux).
(Note: by cross platform, I mean only Windows and Linux)
Help is much appreciated.
[edited by - Tylon on December 31, 2003 10:55:24 AM]