|
Planeshift
|
Check how long time it take to process a scope. More...
#include <psutil.h>
Public Member Functions | |
| ScopedTimer (csTicks limit, const char *format,...) | |
| Start the timer that will print a warning message. More... | |
| ScopedTimer (csTicks limit, ScopedTimerCB *callback) | |
| Start the timer that will call the callback. More... | |
| csTicks | TimeUsed () const |
| To be used in Callbacks to get time used. More... | |
| ~ScopedTimer () | |
| Check the limit and trigger warning if more time used than allowed. More... | |
Check how long time it take to process a scope.
Used to time processes in the server. Will print or call a function if more then limit ticks is used for a scope.
| ScopedTimer::ScopedTimer | ( | csTicks | limit, |
| const char * | format, | ||
| ... | |||
| ) |
Start the timer that will print a warning message.
| limit | The maximum number of ticks anticipated for this scope |
| format | String format of the message to dump |
| ScopedTimer::ScopedTimer | ( | csTicks | limit, |
| ScopedTimerCB * | callback | ||
| ) |
Start the timer that will call the callback.
| limit | The maximum number of ticks anticipated for this scope |
| callback | The callback class |
| ScopedTimer::~ScopedTimer | ( | ) |
Check the limit and trigger warning if more time used than allowed.
| csTicks ScopedTimer::TimeUsed | ( | ) | const |
To be used in Callbacks to get time used.