Start to display BIOS information

This commit is contained in:
2024-03-30 11:57:07 -05:00
parent a8fafdc32e
commit 5b53383d80
6 changed files with 132 additions and 6 deletions

View File

@@ -27,6 +27,13 @@ namespace JabyEngine {
public:
constexpr SimpleTimer() = default;
static SimpleTimer create() {
SimpleTimer timer;
timer.reset();
return timer;
}
bool is_expired_for(T time) const {
return static_cast<T>((MasterTime::read_as<T>() - this->value)) >= time;
}
@@ -46,6 +53,14 @@ namespace JabyEngine {
constexpr IntervalTimer(T interval) : SimpleTimer<T>(), interval(interval) {
}
static constexpr IntervalTimer create(T interval) {
IntervalTimer timer;
static_cast<SimpleTimer<T>&>(timer) = SimpleTimer<T>::create();
timer.interval = interval;
return timer;
}
void set_interval(T interval) {
this->interval = interval;
}