Blame examples/ClockerPlugIn/WinNtTimer.h
|
Packit |
8c9aa0 |
// //////////////////////////////////////////////////////////////////////////
|
|
Packit |
8c9aa0 |
// Header file WinNtTimer.h for class WinNtTimer
|
|
Packit |
8c9aa0 |
// (c)Copyright 2000, Baptiste Lepilleur.
|
|
Packit |
8c9aa0 |
// Created: 2002/04/19
|
|
Packit |
8c9aa0 |
// //////////////////////////////////////////////////////////////////////////
|
|
Packit |
8c9aa0 |
#ifndef WINNTTIMER_H
|
|
Packit |
8c9aa0 |
#define WINNTTIMER_H
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
#include <windows.h>
|
|
Packit |
8c9aa0 |
#include <winnt.h>
|
|
Packit |
8c9aa0 |
#include <winbase.h>
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
/// A Timer.
|
|
Packit |
8c9aa0 |
class WinNtTimer
|
|
Packit |
8c9aa0 |
{
|
|
Packit |
8c9aa0 |
public:
|
|
Packit |
8c9aa0 |
void start();
|
|
Packit |
8c9aa0 |
void finish();
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
double elapsedTime() const;
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
private:
|
|
Packit |
8c9aa0 |
LONGLONG m_beginTime;
|
|
Packit |
8c9aa0 |
double m_elapsedTime;
|
|
Packit |
8c9aa0 |
bool m_isValid;
|
|
Packit |
8c9aa0 |
};
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
// Inlines methods for Timer:
|
|
Packit |
8c9aa0 |
// --------------------------
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
|
|
Packit |
8c9aa0 |
#endif // WINNTTIMER_H
|