Functions providing methods to measure time.
More...
|
INLINE std::chrono::high_resolution_clock::time_point | ai::time () |
| Returns current time point. More...
|
|
INLINE std::chrono::system_clock::time_point | ai::systemTime () |
| Returns current time point. More...
|
|
INLINE double | ai::duration (const std::chrono::high_resolution_clock::time_point start, const std::chrono::high_resolution_clock::time_point finish, const std::string scale=std::string("ms")) |
|
INLINE double | ai::duration (const std::chrono::high_resolution_clock::time_point start, const std::string scale=std::string("ms")) |
|
INLINE void | ai::printDuration (const std::chrono::high_resolution_clock::time_point start, const std::chrono::high_resolution_clock::time_point finish, const std::string scale=std::string("ms"), const std::size_t count=0) |
|
INLINE void | ai::printDuration (const std::chrono::high_resolution_clock::time_point start, const std::string scale=std::string("ms"), const std::size_t count=0) |
|
INLINE std::string | ai::getDateAndTime (std::chrono::system_clock::time_point timePoint=std::chrono::system_clock::now()) |
| Get date and time. More...
|
|
INLINE std::string | ai::getDate (std::chrono::system_clock::time_point timePoint=std::chrono::system_clock::now()) |
| Get date. More...
|
|
INLINE std::string | ai::getTime (std::chrono::system_clock::time_point timePoint=std::chrono::system_clock::now()) |
| Get time. More...
|
|
Group of functions that is in help when you need to measure execution time of some code section
◆ duration() [1/2]
INLINE double ai::duration |
( |
const std::chrono::high_resolution_clock::time_point |
start, |
|
|
const std::chrono::high_resolution_clock::time_point |
finish, |
|
|
const std::string |
scale = std::string("ms") |
|
) |
| |
◆ duration() [2/2]
INLINE double ai::duration |
( |
const std::chrono::high_resolution_clock::time_point |
start, |
|
|
const std::string |
scale = std::string("ms") |
|
) |
| |
◆ getDate()
std::string ai::getDate |
( |
std::chrono::system_clock::time_point |
timePoint = std::chrono::system_clock::now() | ) |
|
This function converts the given moment to std::string containing the passed date
- Parameters
-
timePoint | Optional. The moment on the system clock to be converted, the current time by default |
- Returns
- std::string with date in the format yyyy.mm.dd
◆ getDateAndTime()
std::string ai::getDateAndTime |
( |
std::chrono::system_clock::time_point |
timePoint = std::chrono::system_clock::now() | ) |
|
This function converts the given moment to std::string containing the passed date and time
- Parameters
-
timePoint | Optional. The moment on the system clock to be converted, the current time by default |
- Returns
- std::string with date and time in the format yyyy.mm.dd HH:MM:SS
◆ getTime()
std::string ai::getTime |
( |
std::chrono::system_clock::time_point |
timePoint = std::chrono::system_clock::now() | ) |
|
This function converts the given moment to std::string containing the passed time
- Parameters
-
timePoint | Optional. The moment on the system clock to be converted, the current time by default |
- Returns
- std::string with date time in the format HH:MM:SS
◆ printDuration() [1/2]
INLINE void ai::printDuration |
( |
const std::chrono::high_resolution_clock::time_point |
start, |
|
|
const std::chrono::high_resolution_clock::time_point |
finish, |
|
|
const std::string |
scale = std::string("ms") , |
|
|
const std::size_t |
count = 0 |
|
) |
| |
◆ printDuration() [2/2]
INLINE void ai::printDuration |
( |
const std::chrono::high_resolution_clock::time_point |
start, |
|
|
const std::string |
scale = std::string("ms") , |
|
|
const std::size_t |
count = 0 |
|
) |
| |
◆ systemTime()
std::chrono::system_clock::time_point ai::systemTime |
( |
| ) |
|
This function returns current time point using std::chrono
- Returns
- std::chrono::system_clock entity
◆ time()
std::chrono::high_resolution_clock::time_point ai::time |
( |
| ) |
|
This function returns current time point using std::chrono
- Returns
- std::chrono::high_resolution_clock entity