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

openmc-dev / openmc / 14806247019

03 May 2025 01:45AM UTC coverage: 85.189% (-0.02%) from 85.204%
14806247019

Pull #3391

github

web-flow
Merge 5544b314a into 4138bc34e
Pull Request #3391: Skip atomic relaxation if binding energy is larger than photon energy

1 of 1 new or added line in 1 file covered. (100.0%)

92 existing lines in 17 files now uncovered.

52174 of 61245 relevant lines covered (85.19%)

37175959.21 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

© 2025 Coveralls, Inc