| 209 | |
| 210 | |
| 211 | void * Scheduler::cLPThreadFunc(void * user){ |
| 212 | Scheduler& s = *(Scheduler*)user; |
| 213 | while(s.mRunning){ |
| 214 | //double t = gam::toSec(gam::timeNow()); |
| 215 | s.reclaim(); |
| 216 | //double dt = toSec(timeNow()) - t; |
| 217 | //printf("%g\n", dt); |
| 218 | ::gam::sleepSec(s.mPeriod); |
| 219 | } |
| 220 | return NULL; |
| 221 | } |
| 222 | |
| 223 | void Scheduler::start(){ |
| 224 | mLPThread.joinOnDestroy(true); |