CppTools
Loading...
Searching...
No Matches
Time.hpp
Go to the documentation of this file.
1
11#ifndef CPP_TOOLS_TIME_HPP
12#define CPP_TOOLS_TIME_HPP
13
14#include <ctime>
15#include <chrono>
16#include <iostream>
17
18typedef std::chrono::_V2::system_clock::time_point chrono_t;
19
21namespace CppTools
22{
26 chrono_t GetCurrentTime();
28 void PrintCurrentTime();
34 void PrintTimeDuration(const std::chrono::_V2::system_clock::time_point start,
35 const std::chrono::_V2::system_clock::time_point stop);
36}
37
38#endif /* CPP_TOOLS_TIME_HPP */
void PrintTimeDuration(const std::chrono::_V2::system_clock::time_point start, const std::chrono::_V2::system_clock::time_point stop)
Prints the time duration converted from 2 chrono_t variables. These chrono_t variables can be acquire...
Definition Time.cpp:27
chrono_t GetCurrentTime()
Returns current time as std::chrono::_V2::system_clock::time_point (or chrono_t).
Definition Time.cpp:16
void PrintCurrentTime()
Prints current time in format: Week Month Hour:Minute:Second Year.
Definition Time.cpp:21