alpaqa 1.0.0a15
Nonconvex constrained optimization
Loading...
Searching...
No Matches
timed.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
4
5namespace alpaqa::util {
6template <class T>
7struct Timed {
9 time -= std::chrono::steady_clock::now().time_since_epoch();
10 }
11 ~Timed() { time += std::chrono::steady_clock::now().time_since_epoch(); }
12 Timed(const Timed &) = delete;
13 Timed(Timed &&) = delete;
14 Timed &operator=(const Timed &) = delete;
15 Timed &operator=(Timed &&) = delete;
17};
18#ifndef DOXYGEN
19template <class T>
20Timed(T &) -> Timed<T>;
21#endif
22} // namespace alpaqa::util
constexpr const auto inf
Definition config.hpp:85
Timed(Timed &&)=delete
Timed(const Timed &)=delete
Timed & operator=(Timed &&)=delete
Timed & operator=(const Timed &)=delete
Timed(T &time)
Definition timed.hpp:8