Changeset 970
- Timestamp:
- Apr 1, 2008, 11:21:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/tools/Timer.h
r957 r970 168 168 // It's time to call the function 169 169 if (it->bLoop_) 170 { 170 171 it->time_ += it->interval_; // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously. 172 while (it->time_ <= 0) 173 { 174 // The interval was shorter than one tick, so execute the function more than once 175 it->run(); 176 it->time_ += it->interval_; 177 } 178 } 171 179 else 172 180 it->stopTimer(); // Stop the timer if we don't want to loop
Note: See TracChangeset
for help on using the changeset viewer.