HttpRequest: Use std::chrono for indicating time periods

Allows the use of chrono time points, on top of being more indicative of
time periods used at call sites, if custom timeouts are specified.
This commit is contained in:
Lioncash
2017-06-18 15:36:39 -04:00
parent 795157a9bc
commit 251de89b5c
2 changed files with 8 additions and 5 deletions

View File

@ -4,6 +4,7 @@
#pragma once
#include <chrono>
#include <map>
#include <memory>
#include <optional>
@ -17,7 +18,7 @@ namespace Common
class HttpRequest final
{
public:
HttpRequest(int timeout_ms = 3000);
explicit HttpRequest(std::chrono::milliseconds timeout_ms = std::chrono::milliseconds{3000});
~HttpRequest();
bool IsValid() const;