diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-25 20:30:16 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-02-27 00:36:14 +0100 |
commit | 53c28a8ec9845a90f0c9e1ed83a87dbb7959d14d (patch) | |
tree | ec8b01761fd3c819d4e1317c86e7da37070b1152 /src/network/network_content.h | |
parent | dc7ba33b515c83ec0ebd9cb1789fd20294dee4ec (diff) | |
download | openttd-53c28a8ec9845a90f0c9e1ed83a87dbb7959d14d.tar.xz |
Codechange: [Network] replace _realtime_tick with std::chrono
Diffstat (limited to 'src/network/network_content.h')
-rw-r--r-- | src/network/network_content.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_content.h b/src/network/network_content.h index fc33e72a1..f28821a0b 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -74,7 +74,7 @@ protected: FILE *curFile; ///< Currently downloaded file ContentInfo *curInfo; ///< Information about the currently downloaded file bool isConnecting; ///< Whether we're connecting - uint32 lastActivity; ///< The last time there was network activity + std::chrono::steady_clock::time_point lastActivity; ///< The last time there was network activity friend class NetworkContentConnecter; @@ -100,7 +100,7 @@ protected: void DownloadSelectedContentFallback(const ContentIDList &content); public: /** The idle timeout; when to close the connection because it's idle. */ - static const int IDLE_TIMEOUT = 60 * 1000; + static constexpr std::chrono::seconds IDLE_TIMEOUT = std::chrono::seconds(60); ClientNetworkContentSocketHandler(); ~ClientNetworkContentSocketHandler(); |