mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-18 16:17:14 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
25
vendor/CPR/include/cpr/timeout.h
vendored
Normal file
25
vendor/CPR/include/cpr/timeout.h
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef CPR_TIMEOUT_H
|
||||
#define CPR_TIMEOUT_H
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
||||
namespace cpr {
|
||||
|
||||
class Timeout {
|
||||
public:
|
||||
// NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions)
|
||||
Timeout(const std::chrono::milliseconds& duration) : ms{duration} {}
|
||||
// NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions)
|
||||
Timeout(const std::int32_t& milliseconds) : Timeout{std::chrono::milliseconds(milliseconds)} {}
|
||||
|
||||
// No way around since curl uses a long here.
|
||||
// NOLINTNEXTLINE(google-runtime-int)
|
||||
long Milliseconds() const;
|
||||
|
||||
std::chrono::milliseconds ms;
|
||||
};
|
||||
|
||||
} // namespace cpr
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user