Commit e7411c0c authored by Max Kellermann's avatar Max Kellermann

time/Convert: add `pure` attributes

parent e9af6929
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#ifndef TIME_CONVERT_HXX #ifndef TIME_CONVERT_HXX
#define TIME_CONVERT_HXX #define TIME_CONVERT_HXX
#include "util/Compiler.h"
#include <chrono> #include <chrono>
/** /**
...@@ -52,6 +54,7 @@ LocalTime(std::chrono::system_clock::time_point tp); ...@@ -52,6 +54,7 @@ LocalTime(std::chrono::system_clock::time_point tp);
/** /**
* Convert a UTC-based "struct tm" to a UTC-based time point. * Convert a UTC-based "struct tm" to a UTC-based time point.
*/ */
gcc_pure
std::chrono::system_clock::time_point std::chrono::system_clock::time_point
TimeGm(struct tm &tm); TimeGm(struct tm &tm);
...@@ -60,6 +63,7 @@ TimeGm(struct tm &tm); ...@@ -60,6 +63,7 @@ TimeGm(struct tm &tm);
/** /**
* Convert a local "struct tm" to a UTC-based time point. * Convert a local "struct tm" to a UTC-based time point.
*/ */
gcc_pure
std::chrono::system_clock::time_point std::chrono::system_clock::time_point
MakeTime(struct tm &tm); MakeTime(struct tm &tm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment