diff --git a/src/walltime.cc b/src/walltime.cc index da6d633e..4580c392 100644 --- a/src/walltime.cc +++ b/src/walltime.cc @@ -207,6 +207,8 @@ WallTime Now() } // end namespace walltime +namespace { + std::string DateTimeString(bool local) { typedef std::chrono::system_clock Clock; std::time_t now = Clock::to_time_t(Clock::now()); @@ -225,4 +227,10 @@ std::string DateTimeString(bool local) { return std::string(storage); } +} // end namespace + +std::string LocalDateTimeString() { + return DateTimeString(true); +} + } // end namespace benchmark diff --git a/src/walltime.h b/src/walltime.h index face158c..38c26f33 100644 --- a/src/walltime.h +++ b/src/walltime.h @@ -10,11 +10,7 @@ namespace walltime { WallTime Now(); } // end namespace walltime -std::string DateTimeString(bool local = false); - -inline std::string LocalDateTimeString() { - return DateTimeString(true); -} +std::string LocalDateTimeString(); } // end namespace benchmark