File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
SerialPrograms/Source/NintendoSwitch/Controllers/SysbotBase Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1717#include < fcntl.h>
1818#include < netinet/in.h>
1919#include < arpa/inet.h>
20+ #include < unistd.h>
2021#include " AbstractClientSocket.h"
2122
2223namespace PokemonAutomation {
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ void TcpSysbotBase_Connection::thread_loop(){
135135 std::string str = " Response Time: " + pretty_print (latency.count ()) + " ms" ;
136136 if (latency < 10ms){
137137 set_status (html_color_text (m_version + str, COLOR_BLUE));
138- }else if (latency < 20ms ){
138+ }else if (latency < 50ms ){
139139 set_status (html_color_text (m_version + str, COLOR_ORANGE));
140140 }else {
141141 set_status (html_color_text (m_version + str, COLOR_RED));
@@ -182,9 +182,10 @@ void TcpSysbotBase_Connection::on_connect_finished(const std::string& error_mess
182182 }catch (...){}
183183}
184184void TcpSysbotBase_Connection::on_receive_data (const void * data, size_t bytes){
185+ WallClock now = current_time ();
185186 std::lock_guard<std::mutex> lg (m_lock);
186187 try {
187- m_last_receive = current_time () ;
188+ m_last_receive = now ;
188189// cout << "sys-botbase Response: " << std::string((const char*)data, bytes) << endl;
189190
190191 if (m_version.empty ()){
You can’t perform that action at this time.
0 commit comments