retdec
time.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_UTILS_TIME_H
8 #define RETDEC_UTILS_TIME_H
9 
10 #include <ctime>
11 #include <string>
12 
13 namespace retdec {
14 namespace utils {
15 
16 std::tm *getCurrentTimestamp();
17 std::string getCurrentDate();
18 std::string getCurrentTime();
19 std::string getCurrentYear();
20 std::string timestampToDate(std::tm *tm);
21 std::string timestampToDate(std::time_t timestamp);
22 
23 double getElapsedTime();
24 
25 } // namespace utils
26 } // namespace retdec
27 
28 #endif
std::string getCurrentYear()
Returns the current year in the form YYYY.
Definition: time.cpp:79
std::tm * getCurrentTimestamp()
Returns the current timestamp.
Definition: time.cpp:57
std::string getCurrentDate()
Returns the current date in the form YYYY-MM-DD.
Definition: time.cpp:65
std::string timestampToDate(std::tm *tm)
Returns date in human readable form.
Definition: time.cpp:88
std::string getCurrentTime()
Returns the current time in the form HH:MM:SS.
Definition: time.cpp:72
double getElapsedTime()
Returns how much time has elapsed since the program was started (in seconds).
Definition: time.cpp:110
Definition: archive_wrapper.h:19