mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 21:43:26 +02:00
changes to prepare revgraphics
This commit is contained in:
@@ -29,10 +29,22 @@
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <cxxabi.h>
|
||||
#include <chrono>
|
||||
#include <unistd.h>
|
||||
#include "types.h"
|
||||
|
||||
namespace Fw {
|
||||
|
||||
inline int getTicks() {
|
||||
static auto firstTick = std::chrono::high_resolution_clock::now();
|
||||
auto tickNow = std::chrono::high_resolution_clock::now();
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(tickNow - firstTick).count();
|
||||
}
|
||||
|
||||
inline void sleep(int ms) {
|
||||
usleep(ms);
|
||||
}
|
||||
|
||||
// read utilities for istream
|
||||
inline uint8 getU8(std::istream& in) {
|
||||
uint8 tmp;
|
||||
@@ -256,9 +268,6 @@ inline std::string ip2str(uint32 ip) {
|
||||
return std::string(host);
|
||||
}
|
||||
|
||||
// an empty string to use anywhere needed
|
||||
const static std::string empty_string;
|
||||
|
||||
}
|
||||
|
||||
// shortcut for Fw::dump
|
||||
|
Reference in New Issue
Block a user