mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
ScopeTimer + small fixes
This commit is contained in:
parent
eea920d98f
commit
42e632d220
5 changed files with 29 additions and 7 deletions
|
|
@ -12,6 +12,19 @@ namespace timeutil {
|
|||
int64_t stop();
|
||||
};
|
||||
|
||||
/* Timer that stops and prints time when destructor called
|
||||
* @example:
|
||||
* { // some scope (custom, function, if/else, cycle etc.)
|
||||
* timeutil::ScopeLogTimer scopeclock();
|
||||
* ...
|
||||
* } */
|
||||
class ScopeLogTimer : public Timer{
|
||||
long long scopeid_;
|
||||
public:
|
||||
ScopeLogTimer(long long id);
|
||||
~ScopeLogTimer();
|
||||
};
|
||||
|
||||
float time_value(float hour, float minute, float second);
|
||||
void from_value(float value, int& hour, int& minute, int& second);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue