Utils: Add some typedefs for std::chrono durations

pull/3145/head
Peter Keresztes Schmidt 2021-02-09 00:57:47 +01:00
parent b22dbd4788
commit 4cd70fec1a
1 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#ifndef ZM_UTILS_H
#define ZM_UTILS_H
#include <chrono>
#include <ctime>
#include <sys/time.h>
#include <string>
@ -54,4 +55,14 @@ extern unsigned int neonversion;
char *timeval_to_string( struct timeval tv );
std::string UriDecode( const std::string &encoded );
void touch( const char *pathname );
typedef std::chrono::microseconds Microseconds;
typedef std::chrono::milliseconds Milliseconds;
typedef std::chrono::seconds Seconds;
typedef std::chrono::minutes Minutes;
typedef std::chrono::hours Hours;
typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;
#endif // ZM_UTILS_H