![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
#include <stats.h>
Public Member Functions | |
EnabledScopedTimeDistributionUpdater (TimeDistribution *stat) | |
EnabledScopedTimeDistributionUpdater (const EnabledScopedTimeDistributionUpdater &)=delete | |
This type is neither copyable nor movable. | |
EnabledScopedTimeDistributionUpdater & | operator= (const EnabledScopedTimeDistributionUpdater &)=delete |
~EnabledScopedTimeDistributionUpdater () | |
void | AlsoUpdate (TimeDistribution *also_update) |
Helper classes to time a block of code and add the result to a TimeDistribution. Calls StartTimer() on creation and StopTimerAndAddElapsedTime() on destruction.
There are three classes with the same interface:
|
inlineexplicit |
|
delete |
This type is neither copyable nor movable.
|
inline |
|
inline |
Updates another TimeDistribution on destruction. This is useful to split a total time measurement in different categories:
EnabledScopedTimeDistributionUpdater timer(&total_timer); ... switch (type) { case TypeA : timer.AlsoUpdate(&typeA_timer); break; case TypeB : timer.AlsoUpdate(&typeB_timer); break; }
|
delete |