forked from Kolyah35/minecraft-pe-0.6.1
server compilable
This commit is contained in:
23
src/platform/server/PlatformServer.cpp
Normal file
23
src/platform/server/PlatformServer.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user