Move the Timer::sleep implementation up from timer/sdl/Timer.cpp to timer/Timer.cpp, since it doesn't directly use any SDL-specific code.

This commit is contained in:
Alex Szpakowski
2016-03-18 23:01:49 -03:00
parent b983588d2e
commit 36cc48d306
4 changed files with 8 additions and 14 deletions
+7
View File
@@ -21,6 +21,7 @@
// LOVE
#include "common/config.h"
#include "common/int.h"
#include "common/delay.h"
#include "Timer.h"
#if defined(LOVE_WINDOWS)
@@ -85,6 +86,12 @@ void Timer::step()
}
}
void Timer::sleep(double seconds) const
{
if (seconds > 0)
love::sleep((unsigned int)(seconds*1000));
}
double Timer::getDelta() const
{
return dt;