Classes | |
| class | Mutex |
| A mutex class for safe multithreading. More... | |
| class | ReadWriteLock |
| A read-write lock. More... | |
| class | MutexHolder |
| A mutex holder which locks a Mutex class. More... | |
| class | RWLockHolder |
| A read/write lock holder which locks a Mutex class. More... | |
| class | Stopwatch |
| A timer class designed for code profiling. More... | |
Enumerations | |
| enum | MutexType { MUTEX_TYPE_NORMAL, MUTEX_TYPE_RECURSIVE, MUTEX_TYPE_ERRORCHECK } |
| The type of mutex to be created. More... | |
| enum | RWLockHolderType |
| The type of mutex holder to create. | |
Functions | |
| void | InitTimer () |
| Initializes the high-resolution timer. | |
| void | SetTimerState (bool _paused) |
| Pauses or resumes the high-resolution timer. | |
| void | AdvancePausedTimer (double _seconds) |
| Increments the paused timer by the specified value. | |
| double | GetHighResTime () |
| Gets the time since InitTimer() was called. | |
| void | ThreadSleep (int _msec) |
| Sleeps the current thread for a specified time. | |
| long | RandomNumber () |
| Generates a random number. | |
| void | SeedRandom () |
| Generates a random number. | |
Contains platform-specific API call wrappers, which allow the programmer to write code which is cross-platform and functions identically on all platforms.
| enum MutexType |
The type of mutex to be created.
| void CrissCross::System::AdvancePausedTimer | ( | double | _seconds | ) |
Increments the paused timer by the specified value.
| _seconds | Time in seconds to increase the timer by. |
| double CrissCross::System::GetHighResTime | ( | ) |
| long CrissCross::System::RandomNumber | ( | ) |
| void CrissCross::System::SeedRandom | ( | ) |
Generates a random number.
Seeds the random number generator with the current time.
| void CrissCross::System::SetTimerState | ( | bool | _paused | ) |
Pauses or resumes the high-resolution timer.
If _paused is true, the current timestamp on the high-resolution timer is locked. If _paused is false, the GetHighResTime() will compensate for the pause duration.
| _paused | Indicates whether to pause or unpause the timer. |
| void CrissCross::System::ThreadSleep | ( | int | _msec | ) |
Sleeps the current thread for a specified time.
| _msec | Time to sleep for, in milliseconds. |
1.5.8