mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user