Merge pull request #5 from cjcliffe/master

Win32 timer class fix
This commit is contained in:
Charles J. Cliffe 2014-11-17 18:17:10 -05:00
commit 44542dd878
2 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,7 @@
#include "Timer.h"
#ifdef _WIN32
#ifdef WIN32
#include <mmsystem.h>
#endif
@ -97,7 +97,7 @@ void Timer::update(void)
}
else
{
#ifdef _WIN32
#ifdef WIN32
system_milliseconds = timeGetTime ();
#else
gettimeofday(&time_val,&time_zone);

View File

@ -24,9 +24,10 @@
#ifndef TIMER_H
#define TIMER_H
#ifndef _WIN32
#ifndef WIN32
#include <sys/time.h>
#endif
#include <windows.h>
/// Timer Class, high resolution timer
/**
@ -46,7 +47,7 @@ private:
unsigned long paused_time;
unsigned long offset;
#ifndef _WIN32
#ifndef WIN32
struct timeval time_val;
struct timezone time_zone;
#endif