• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 14388959122

10 Apr 2025 07:43PM UTC coverage: 85.123% (+0.08%) from 85.044%
14388959122

Pull #3366

github

web-flow
Merge 4dd50b246 into cdc254ccf
Pull Request #3366: Add methods on Material class for waste disposal rating / classification

63 of 71 new or added lines in 2 files covered. (88.73%)

106 existing lines in 18 files now uncovered.

51732 of 60773 relevant lines covered (85.12%)

36998786.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/include/openmc/timer.h
1
#ifndef OPENMC_TIMER_H
2
#define OPENMC_TIMER_H
3

4
#include <chrono>
5

6
namespace openmc {
7

8
//==============================================================================
9
// Global variables
10
//==============================================================================
11

12
class Timer;
13

14
namespace simulation {
15

16
extern Timer time_active;
17
extern Timer time_bank;
18
extern Timer time_bank_sample;
19
extern Timer time_bank_sendrecv;
20
extern Timer time_finalize;
21
extern Timer time_inactive;
22
extern Timer time_initialize;
23
extern Timer time_read_xs;
24
extern Timer time_statepoint;
25
extern Timer time_tallies;
26
extern Timer time_total;
27
extern Timer time_transport;
28
extern Timer time_event_init;
29
extern Timer time_event_calculate_xs;
30
extern Timer time_event_advance_particle;
31
extern Timer time_event_surface_crossing;
32
extern Timer time_event_collision;
33
extern Timer time_event_death;
34
extern Timer time_update_src;
35

36
} // namespace simulation
37

38
//==============================================================================
39
//! Class for measuring time elapsed
40
//==============================================================================
41

42
class Timer {
43
public:
44
  using clock = std::chrono::high_resolution_clock;
45

UNCOV
46
  Timer() {};
×
47

48
  //! Start running the timer
49
  void start();
50

51
  //! Get total elapsed time in seconds
52
  //! \return Elapsed time in [s]
53
  double elapsed();
54

55
  //! Stop running the timer
56
  void stop();
57

58
  //! Stop the timer and reset its elapsed time
59
  void reset();
60

61
private:
62
  bool running_ {false};                 //!< is timer running?
63
  std::chrono::time_point<clock> start_; //!< starting point for clock
64
  double elapsed_ {0.0};                 //!< elapsed time in [s]
65
};
66

67
//==============================================================================
68
// Non-member functions
69
//==============================================================================
70

71
void reset_timers();
72

73
} // namespace openmc
74

75
#endif // OPENMC_TIMER_H
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc