diff --git a/enet/WebSocket.cpp b/enet/WebSocket.cpp index bd6eb3c..8410c42 100644 --- a/enet/WebSocket.cpp +++ b/enet/WebSocket.cpp @@ -167,7 +167,7 @@ void enet::WebSocket::onReceiveData(enet::Tcp& _connection) { ENET_VERBOSE("ReadRaw 2 [STOP]"); return; } - m_lastReceive = std::chrono::steady_clock::now(); + m_lastReceive = echrono::Steady::now(); if ((opcode & 0x80) == 0) { ENET_ERROR("Multiple frames ... NOT managed ... : " << (opcode & 0x80) << (opcode & 0x40) << (opcode & 0x20) << (opcode & 0x10) << (opcode & 0x08) << (opcode & 0x04) << (opcode & 0x02) << (opcode & 0x01)); m_interface->stop(true); @@ -510,7 +510,7 @@ void enet::WebSocket::controlPing() { } uint8_t header = enet::websocket::FLAG_FIN | enet::websocket::OPCODE_FRAME_PING; - m_lastSend = std::chrono::steady_clock::now(); + m_lastSend = echrono::Steady::now(); m_interface->write(&header, sizeof(uint8_t)); header = 0; m_interface->write(&header, sizeof(uint8_t)); @@ -523,7 +523,7 @@ void enet::WebSocket::controlPong() { } uint8_t header = enet::websocket::FLAG_FIN | enet::websocket::OPCODE_FRAME_PONG; - m_lastSend = std::chrono::steady_clock::now(); + m_lastSend = echrono::Steady::now(); m_interface->write(&header, sizeof(uint8_t)); header = 0; m_interface->write(&header, sizeof(uint8_t)); @@ -536,7 +536,7 @@ void enet::WebSocket::controlClose() { } uint8_t header = enet::websocket::FLAG_FIN | enet::websocket::OPCODE_FRAME_CLOSE; - m_lastSend = std::chrono::steady_clock::now(); + m_lastSend = echrono::Steady::now(); m_interface->write(&header, sizeof(uint8_t)); header = 0; m_interface->write(&header, sizeof(uint8_t)); diff --git a/enet/WebSocket.hpp b/enet/WebSocket.hpp index 14bd660..c335555 100644 --- a/enet/WebSocket.hpp +++ b/enet/WebSocket.hpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -18,13 +19,13 @@ namespace enet { ememory::SharedPtr m_interface; std::vector m_buffer; std::string m_checkKey; - std::chrono::steady_clock::time_point m_lastReceive; - std::chrono::steady_clock::time_point m_lastSend; + echrono::Steady m_lastReceive; + echrono::Steady m_lastSend; public: - const std::chrono::steady_clock::time_point& getLastTimeReceive() { + const echrono::Steady& getLastTimeReceive() { return m_lastReceive; } - const std::chrono::steady_clock::time_point& getLastTimeSend() { + const echrono::Steady& getLastTimeSend() { return m_lastSend; } public: