Implement #6096
[oweals/minetest.git] / src / gettime.h
index a93eee38753aa0f394f1ba07ff42587de525398f..f20728dfdab6628e46905f8f493dec82e3b7a6de 100644 (file)
@@ -17,14 +17,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef GETTIME_HEADER
-#define GETTIME_HEADER
+#pragma once
 
 #include "irrlichttypes.h"
-#include <time.h>
+#include <ctime>
 #include <string>
 
-
 enum TimePrecision
 {
        PRECISION_SECONDS,
@@ -33,7 +31,6 @@ enum TimePrecision
        PRECISION_NANO
 };
 
-
 inline std::string getTimestamp()
 {
        time_t t = time(NULL);
@@ -44,5 +41,3 @@ inline std::string getTimestamp()
        strftime(cs, 20, "%Y-%m-%d %H:%M:%S", tm);
        return cs;
 }
-
-#endif