forked from Kolyah35/minecraft-pe-0.6.1
23 lines
440 B
C++
23 lines
440 B
C++
#include "PlatformServer.h"
|
|
|
|
#include <ctime>
|
|
|
|
#include "App.h"
|
|
#include "platform/time.h"
|
|
|
|
void PlatformServer::runMainLoop(App& app) {
|
|
while (!app.wantToQuit()) {
|
|
app.update();
|
|
|
|
sleepMs(20);
|
|
}
|
|
}
|
|
|
|
std::string PlatformServer::getDateString(int s) {
|
|
time_t tm = s;
|
|
|
|
char mbstr[100];
|
|
std::strftime(mbstr, sizeof(mbstr), "%F %T", std::localtime(&tm));
|
|
|
|
return std::string(mbstr);
|
|
} |