You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
561 B
27 lines
561 B
/* TimerSdl.h |
|
* |
|
* Uses SDL's delay function to maintain timing. Since SDL's only supports |
|
* millisecond accuracy, using the native OS timing functions is preferred |
|
* where possible. |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <SDL.h> |
|
|
|
#include "Timer.h" |
|
|
|
namespace PlipSdl { |
|
class TimerSdl : public Timer { |
|
public: |
|
TimerSdl() = default; |
|
|
|
void Nanosleep(long ns) override; |
|
void StopwatchStart() override; |
|
unsigned long StopwatchStop() override; |
|
|
|
private: |
|
float m_sleepSkew = 0; |
|
Uint32 m_stopwatchVal = 0; |
|
}; |
|
}
|
|
|