mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
multiline textbox mode
This commit is contained in:
parent
925ef426de
commit
256808630b
11 changed files with 260 additions and 51 deletions
|
|
@ -19,10 +19,6 @@ timeutil::ScopeLogTimer::~ScopeLogTimer() {
|
|||
std::cout << "Scope "<< scopeid_ <<" finished in "<< ScopeLogTimer::stop() << " micros. \n";
|
||||
}
|
||||
|
||||
float timeutil::time_value(float hour, float minute, float second) {
|
||||
return (hour + (minute + second / 60.0f) / 60.0f) / 24.0f;
|
||||
}
|
||||
|
||||
void timeutil::from_value(float value, int& hour, int& minute, int& second) {
|
||||
value *= 24;
|
||||
hour = value;
|
||||
|
|
|
|||
|
|
@ -12,12 +12,14 @@ 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();
|
||||
* ...
|
||||
* } */
|
||||
/**
|
||||
* 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:
|
||||
|
|
@ -25,7 +27,10 @@ namespace timeutil {
|
|||
~ScopeLogTimer();
|
||||
};
|
||||
|
||||
float time_value(float hour, float minute, float second);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue