mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
the final rename
This commit is contained in:
parent
f27a418dbe
commit
1627e21c1d
196 changed files with 836 additions and 815 deletions
|
|
@ -1,37 +0,0 @@
|
|||
#ifndef UTIL_TIMEUTIL_H_
|
||||
#define UTIL_TIMEUTIL_H_
|
||||
|
||||
#include "../typedefs.h"
|
||||
#include <chrono>
|
||||
|
||||
namespace timeutil {
|
||||
class Timer {
|
||||
std::chrono::high_resolution_clock::time_point start;
|
||||
public:
|
||||
Timer();
|
||||
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();
|
||||
};
|
||||
|
||||
inline constexpr float time_value(float hour, float minute, float second) {
|
||||
return (hour + (minute + second / 60.0f) / 60.0f) / 24.0f;
|
||||
}
|
||||
|
||||
void from_value(float value, int& hour, int& minute, int& second);
|
||||
}
|
||||
|
||||
#endif // UTIL_TIMEUTIL_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue