Hello everybody, i need to create a timer for test my network platform and i wish a millisecond precision.
So i did this.
// ********************************************************
// file timer.h
// ********************************************************
// Timer class: For test perform
// ********************************************************
// On the STMicro platform, the time returned by GetTickCount
// includes a ~0.014% time drift, which is by design. This
// translates to a time lag of approximately 1s every 2h.
// The time will wrap around to zero if the system is run
// continuously for 49.7 days. msdn source.
#ifndef _TIMER_H_
#define _TIMER_H_
#define MAX_SAUV 100
#include <windows.h>
class Timer
{
public:
Timer()
{ for(int i = 0;i<MAX_SAUV;i++)
{
sauv[i]=0;
}
}