cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
timer.hpp File Reference
#include <chrono>
#include <string>
#include <vector>
#include <cpp-toolbox/cpp-toolbox_export.hpp>
Include dependency graph for timer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  toolbox::utils::stop_watch_timer_t
 A high-resolution stopwatch timer for measuring elapsed time. More...
 
class  toolbox::utils::simple_timer_interface_t
 Interface for managing a collection of timers. More...
 
class  toolbox::utils::simple_timer_array_t
 Concrete implementation of simple_timer_interface_t using an array of timers. More...
 

Namespaces

namespace  toolbox
 
namespace  toolbox::utils
 < 用于 std::out_of_range/For std::out_of_range
 

Functions

auto toolbox::utils::create_timer (simple_timer_interface_t **timer_interface, int size) -> bool
 Create a timer collection with specified size.
 
auto toolbox::utils::create_timer_with_names (simple_timer_interface_t **timer_interface, const std::vector< std::string > &names) -> bool
 Create a timer collection with specified names.
 
auto toolbox::utils::delete_timer (simple_timer_interface_t **timer_interface) -> bool
 Delete a timer collection.
 
auto toolbox::utils::start_timer (simple_timer_interface_t **timer_interface, int id) -> bool
 Start a specific timer.
 
auto toolbox::utils::stop_timer (simple_timer_interface_t **timer_interface, int id) -> bool
 Stop a specific timer.
 
auto toolbox::utils::reset_timer (simple_timer_interface_t **timer_interface, int id) -> bool
 Reset a specific timer.
 
auto toolbox::utils::display_timer (simple_timer_interface_t **timer_interface, int id) -> bool
 Display statistics for a specific timer.
 
auto toolbox::utils::display_all_timer (simple_timer_interface_t **timer_interface) -> bool
 Display statistics for all timers.
 
auto toolbox::utils::get_timer_elapsed (simple_timer_interface_t **timer_interface, int id) -> double
 Get the elapsed time in seconds for a specific timer.
 
auto toolbox::utils::get_timer_elapsed_ms (simple_timer_interface_t **timer_interface, int id) -> double
 Get the elapsed time in milliseconds for a specific timer.