remwharead  0.9.1
time.hpp
Go to the documentation of this file.
1 /* This file is part of remwharead.
2  * Copyright © 2019 tastytea <tastytea@tastytea.de>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef REMWHAREAD_TIME_HPP
18 #define REMWHAREAD_TIME_HPP
19 
20 #include <chrono>
21 #include <string>
22 
24 
25 namespace remwharead
26 {
27 using std::string;
28 using std::chrono::system_clock;
29 using time_point = system_clock::time_point;
30 
39 [[nodiscard]]
40 time_point string_to_timepoint(const string &strtime, bool sqlite = false);
41 
50 [[nodiscard]]
51 string timepoint_to_string(const time_point &tp, bool sqlite = false);
52 } // namespace remwharead
53 
54 #endif // REMWHAREAD_TIME_HPP