![]() |
Shamrock 2025.10.0
Astrophysical Code
|
#include "shambase/aliases_float.hpp"#include "shambase/string.hpp"#include <plf_nanotimer.h>#include <functional>#include <iostream>
Include dependency graph for time.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | shambase::Timer |
| Class Timer measures the time elapsed since the timer was started. More... | |
| class | shambase::FunctionTimer |
| Class FunctionTimer measures the time it takes to execute a function. More... | |
| struct | shambase::BenchmarkResult |
| Structure to store the results of a benchmark. More... | |
Namespaces | |
| namespace | shambase |
| namespace for basic c++ utilities | |
Functions | |
| std::string | shambase::nanosec_to_time_str (double nanosec) |
| Convert nanoseconds to a human-readable string representation. | |
| template<class Func > | |
| f64 | shambase::timeit (Func &&f, u32 relaunch=1) |
| Measures the average time it takes to execute a function. | |
| template<class Func > | |
| f64 | shambase::timeitfor (Func &&f, f64 max_duration=1) |
| Measures the average time it takes to execute a function until a maximum duration is reached. | |
| BenchmarkResult | shambase::benchmark_pow_len (std::function< f64(u32)> func, u32 start, u32 end, f64 pow_exp) |
| Benchmark a function with input values following a power law. | |
Definition in file time.hpp.