LkEngine 0.1.2
 
Loading...
Searching...
No Matches
Time.h
1/******************************************************************
2 * Time
3 *
4 *******************************************************************/
5#pragma once
6
14#include <fstream>
15#include <filesystem>
16#include <chrono>
17#include <iomanip>
18#include <sstream>
19
21
28namespace LkEngine::Time {
29
33 FORCEINLINE static std::string CurrentTimestamp(std::string_view InFormat = "%Y-%m-%d-%H%M%S")
34 {
35 using namespace std::chrono;
36 time_point<system_clock> Now = system_clock::now();
37 std::time_t CurrentTime = system_clock::to_time_t(Now);
38
39 std::stringstream StrStream;
40 StrStream << std::put_time(std::localtime(&CurrentTime), InFormat.data());
41
42 return StrStream.str();
43 }
44
45}
46
Core macros used by the entire engine.
Time utility.
Definition Time.h:28