Celeritas 0.7.0-dev.245+develop.a7be925e
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::ScopedTimeLog Class Reference

Print the elapsed time since construction when destructed. More...

#include <ScopedTimeLog.hh>

Public Member Functions

 ScopedTimeLog (Logger *dest)
 Construct with a reference to a particular logger.
 
 ScopedTimeLog (double min_print_sec)
 Construct with a manual threshold for printing time.
 
 ScopedTimeLog (Logger *dest, double min_print_sec)
 Construct with a reference to a particular logger.
 
 ~ScopedTimeLog ()
 Print large enough times when exiting scope.
 
 ScopedTimeLog (ScopedTimeLog const &)=delete
 
ScopedTimeLogoperator= (ScopedTimeLog const &)=delete
 
 ScopedTimeLog (ScopedTimeLog &&)=delete
 
ScopedTimeLogoperator= (ScopedTimeLog &&)=delete
 

Detailed Description

Print the elapsed time since construction when destructed.

An optional construction argument specifies the minimum time needed to bother printing.

{
CELER_LOG(info) << "Doing something expensive";
ScopedTimeLog scoped_time;
do_something_expensive();
}
Print the elapsed time since construction when destructed.
Definition ScopedTimeLog.hh:33
#define CELER_LOG(LEVEL)
Return a LogMessage object for streaming into at the given level.
Definition corecel/io/Logger.hh:47

Constructor & Destructor Documentation

◆ ScopedTimeLog() [1/2]

celeritas::ScopedTimeLog::ScopedTimeLog ( ScopedTimeLog const )
delete

Prevent copying and moving for RAII class

◆ ScopedTimeLog() [2/2]

celeritas::ScopedTimeLog::ScopedTimeLog ( ScopedTimeLog &&  )
delete

Prevent copying and moving for RAII class

Member Function Documentation

◆ operator=() [1/2]

ScopedTimeLog & celeritas::ScopedTimeLog::operator= ( ScopedTimeLog &&  )
delete

Prevent copying and moving for RAII class

◆ operator=() [2/2]

ScopedTimeLog & celeritas::ScopedTimeLog::operator= ( ScopedTimeLog const )
delete

Prevent copying and moving for RAII class


The documentation for this class was generated from the following file: