Loading...
Searching...
No Matches
ForceCallTimer.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13#include "Potential.h"
14
15namespace eonc {
16
21 size_t &target_;
22 size_t initial_;
23
24public:
25 explicit ForceCallTimer(size_t &target)
26 : target_(target),
27 initial_(PotRegistry::get().total_force_calls()) {}
31
32 // Non-copyable, non-movable
33 ForceCallTimer(const ForceCallTimer &) = delete;
35};
36
37} // namespace eonc
ForceCallTimer(const ForceCallTimer &)=delete
ForceCallTimer(size_t &target)
ForceCallTimer & operator=(const ForceCallTimer &)=delete
static PotRegistry & get() noexcept
Process-lifetime singleton.
size_t total_force_calls() const noexcept
RAII resource manager for the ARTn C library with global synchronization.