some fixes
PIEthernet::listen PIClientServer::Server::~Server PISystemTime const sleep ClientServer tests fast and stable
This commit is contained in:
@@ -72,11 +72,7 @@ PIClientServer::Server::~Server() {
|
||||
clean_thread->waitForFinish();
|
||||
piDeleteSafety(clean_thread);
|
||||
stopServer();
|
||||
for (auto c: clients) {
|
||||
c->aboutDelete();
|
||||
c->destroy();
|
||||
delete c;
|
||||
}
|
||||
closeAll();
|
||||
piDeleteSafety(tcp_server);
|
||||
}
|
||||
|
||||
|
||||
@@ -527,6 +527,7 @@ bool PIEthernet::listen(bool threaded) {
|
||||
listen_threaded = true;
|
||||
server_bounded = false;
|
||||
server_thread_.start(server_func);
|
||||
server_thread_.waitForStart();
|
||||
return true;
|
||||
}
|
||||
listen_threaded = server_bounded = false;
|
||||
|
||||
@@ -105,7 +105,7 @@ extern clock_serv_t __pi_mac_clock;
|
||||
//! Используйте этот метод для ожидания разниц системных времен или своего времени.
|
||||
//! Если метод будет вызван для системного времени \a PISystemTime::current(), то
|
||||
//! ожидание будет почти бесконечным
|
||||
void PISystemTime::sleep() {
|
||||
void PISystemTime::sleep() const {
|
||||
piUSleep(piFloord(toMicroseconds()));
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void PISystemTime::toTimespec(void * ts) {
|
||||
}
|
||||
|
||||
|
||||
PISystemTime::Frequency PISystemTime::toFrequency() {
|
||||
PISystemTime::Frequency PISystemTime::toFrequency() const {
|
||||
return PISystemTime::Frequency::fromSystemTime(*this);
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
|
||||
//! \~english Sleep for this time
|
||||
//! \~russian Ожидать это время
|
||||
void sleep();
|
||||
void sleep() const;
|
||||
|
||||
//! \~english On *nix system assign current value to timespec struct
|
||||
//! \~russian На *nix системах присваивает время к timespec структуре
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
|
||||
//! \~english Returns \a Frequency that corresponds this time interval
|
||||
//! \~russian Возвращает \a Frequency соответствующую этому временному интервалу
|
||||
PISystemTime::Frequency toFrequency();
|
||||
PISystemTime::Frequency toFrequency() const;
|
||||
|
||||
//! \~english Returns "yyyy-MM-dd hh:mm:ss.zzz" for absolute time and "<V> <d|h|m|s|ms|us|ns> ..." for relative
|
||||
//! \~russian Возвращает "yyyy-MM-dd hh:mm:ss.zzz" для абсолютного времени и "<V> <d|h|m|s|ms|us|ns> ..." для относительного
|
||||
|
||||
Reference in New Issue
Block a user