Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
kcenon::network::concepts::Duration Concept Reference

A type that represents a time duration. More...

#include <network_concepts.h>

Concept definition

template<typename T>
typename T::rep;
typename T::period;
} && std::is_arithmetic_v<typename T::rep>
A type that represents a time duration.

Detailed Description

A type that represents a time duration.

Example usage:

template<Duration D>
void set_timeout(D duration) {
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
// use ms.count()
}

Definition at line 343 of file network_concepts.h.