event/TimerEvent: add type alias for std::chrono::steady_clock::duration

This commit is contained in:
Max Kellermann
2020-10-08 19:35:36 +02:00
parent ce93e58944
commit eeb96eb367
19 changed files with 84 additions and 51 deletions

View File

@@ -24,7 +24,7 @@
#define CLIENT_MAX_COMMAND_LIST_DEFAULT (2048*1024)
#define CLIENT_MAX_OUTPUT_BUFFER_SIZE_DEFAULT (8192*1024)
std::chrono::steady_clock::duration client_timeout;
Event::Duration client_timeout;
size_t client_max_command_list_size;
size_t client_max_output_buffer_size;

View File

@@ -20,11 +20,11 @@
#ifndef MPD_CLIENT_CONFIG_HXX
#define MPD_CLIENT_CONFIG_HXX
#include <chrono>
#include "event/Chrono.hxx"
struct ConfigData;
extern std::chrono::steady_clock::duration client_timeout;
extern Event::Duration client_timeout;
extern size_t client_max_command_list_size;
extern size_t client_max_output_buffer_size;

View File

@@ -34,7 +34,7 @@ Client::SetExpired() noexcept
}
FullyBufferedSocket::Close();
timeout_event.Schedule(std::chrono::steady_clock::duration::zero());
timeout_event.Schedule(Event::Duration::zero());
}
void