Contains useful set of functions to print current time, time duration. More...
#include <ctime>#include <chrono>#include <iostream>Go to the source code of this file.
Typedefs | |
| typedef std::chrono::_V2::system_clock::time_point | chrono_t |
Functions | |
| chrono_t | CppTools::GetCurrentTime () |
| Returns current time as std::chrono::_V2::system_clock::time_point (or chrono_t). | |
| void | CppTools::PrintCurrentTime () |
| Prints current time in format: Week Month Hour:Minute:Second Year. | |
| void | CppTools::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 acquired with the use of chrono_t CppTools::GetCurrentTime function. If the both variables were acquired as a current time measurement in 2 different points in time then the returned duration is the time duration between these 2 different points in time. | |
Contains useful set of functions to print current time, time duration.
In order to use these functions libTime.so must be loaded
This file is a part of a project CppTools (https://github.com/Sergeyir/CppTools).
| chrono_t CppTools::GetCurrentTime | ( | ) |
Returns current time as std::chrono::_V2::system_clock::time_point (or chrono_t).
| [out] | currentTime | chrono_t variable |
| void CppTools::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 acquired with the use of chrono_t CppTools::GetCurrentTime function. If the both variables were acquired as a current time measurement in 2 different points in time then the returned duration is the time duration between these 2 different points in time.
| [in] | start | first chrono_t variable |
| [in] | stop | second chrono_t variable |