Data Structures | Defines | Functions

# timer.c File Reference

`#include "wizard/studio.h"`
`#include "wizard/exception.h"`
`#include "wizard/exception-private.h"`
`#include "wizard/log.h"`
`#include "wizard/memory_.h"`
`#include "wizard/timer.h"`

## Data Structures

struct | _TimerInfo

## Defines

#define | CLK_TCK sysconf(_SC_CLK_TCK)

## Functions

static double | UserTime (void)
static void | StopTimer (TimerInfo *)
WizardExport TimerInfo * | AcquireTimerInfo (void)
WizardExport WizardBooleanType | ContinueTimer (TimerInfo *timer_info)
WizardExport TimerInfo * | DestroyTimerInfo (TimerInfo *timer_info)
static double | ElapsedTime (void)
WizardExport double | GetElapsedTime (TimerInfo *timer_info)
WizardExport void | GetTimerInfo (TimerInfo *timer_info)
WizardExport double | GetUserTime (TimerInfo *timer_info)
WizardExport void | ResetTimer (TimerInfo *timer_info)
WizardExport void | StartTimer (TimerInfo *timer_info, const WizardBooleanType reset)

## Define Documentation

#define CLK_TCK sysconf(_SC_CLK_TCK)

Referenced by ElapsedTime(), and UserTime().

## Function Documentation

WizardExport TimerInfo* AcquireTimerInfo | ( | void |  | ) |

References AcquireWizardMemory(), CipherDomain, GetTimerInfo(), MemoryError, ResetWizardMemory(), _TimerInfo::signature, and ThrowWizardFatalError.

Referenced by LoadLogList(), and LoadLogLists().

WizardExport WizardBooleanType ContinueTimer | ( | TimerInfo * | timer_info | ) |

References _TimerInfo::elapsed, _TimerInfo::signature, _Timer::start, _TimerInfo::state, _Timer::stop, StoppedTimerState, _Timer::total, UndefinedTimerState, _TimerInfo::user, WizardFalse, WizardSignature, and WizardTrue.

Referenced by LogWizardEventList().

WizardExport TimerInfo* DestroyTimerInfo | ( | TimerInfo * | timer_info | ) |

References CipherDomain, RelinquishWizardMemory(), _TimerInfo::signature, WizardAssert, and WizardSignature.

Referenced by DestroyLogElement().

static double ElapsedTime | ( | void |  | ) | `[static]`

References CLK_TCK, and NTElapsedTime().

Referenced by StartTimer(), and StopTimer().

WizardExport double GetElapsedTime | ( | TimerInfo * | timer_info | ) |

References _TimerInfo::elapsed, RunningTimerState, _TimerInfo::signature, _TimerInfo::state, StopTimer(), _Timer::total, UndefinedTimerState, and WizardSignature.

Referenced by TranslateEvent().

WizardExport void GetTimerInfo | ( | TimerInfo * | timer_info | ) |

References StartTimer(), _TimerInfo::state, and WizardTrue.

Referenced by AcquireTimerInfo().

WizardExport double GetUserTime | ( | TimerInfo * | timer_info | ) |

References RunningTimerState, _TimerInfo::signature, _TimerInfo::state, StopTimer(), _Timer::total, UndefinedTimerState, _TimerInfo::user, and WizardSignature.

Referenced by TranslateEvent().

WizardExport void ResetTimer | ( | TimerInfo * | timer_info | ) |

References _TimerInfo::elapsed, _TimerInfo::signature, _Timer::stop, StopTimer(), _TimerInfo::user, and WizardSignature.

WizardExport void StartTimer | ( | TimerInfo * | timer_info,
|  | const WizardBooleanType | reset |
| ) |  |  |

References _TimerInfo::elapsed, ElapsedTime(), RunningTimerState, _TimerInfo::signature, _Timer::start, _TimerInfo::state, _Timer::total, _TimerInfo::user, UserTime(), WizardFalse, and WizardSignature.

Referenced by GetTimerInfo().

static void StopTimer | ( | TimerInfo * | timer_info | ) | `[static]`

References _TimerInfo::elapsed, ElapsedTime(), RunningTimerState, _TimerInfo::signature, _Timer::start, _TimerInfo::state, _Timer::stop, _Timer::total, _TimerInfo::user, UserTime(), and WizardSignature.

Referenced by GetElapsedTime(), GetUserTime(), and ResetTimer().

static double UserTime | ( | void |  | ) | `[static]`

References CLK_TCK, and NTUserTime().

Referenced by StartTimer(), and StopTimer().