mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
fatal: Fix autoreboot logic
This commit is contained in:
parent
ee5a095c1a
commit
501280b6e5
2 changed files with 5 additions and 5 deletions
|
@ -68,11 +68,11 @@ namespace ams::fatal::srv {
|
|||
}
|
||||
|
||||
u64 GetQuestRebootTimeoutInterval() const {
|
||||
return this->quest_reboot_interval_second * 1'000'000'000ul;
|
||||
return this->quest_reboot_interval_second * 1'000ul;
|
||||
}
|
||||
|
||||
u64 GetFatalRebootTimeoutInterval() const {
|
||||
return this->fatal_auto_reboot_interval * 1'000'000ul;
|
||||
return this->fatal_auto_reboot_interval;
|
||||
}
|
||||
|
||||
const char *GetErrorMessage() const {
|
||||
|
|
|
@ -55,15 +55,15 @@ namespace ams::fatal::srv {
|
|||
private:
|
||||
os::Tick start_tick;
|
||||
bool flag;
|
||||
s32 interval;
|
||||
s64 interval;
|
||||
public:
|
||||
RebootTimingObserver(bool flag, s32 interval) : start_tick(os::GetSystemTick()), flag(flag), interval(interval) {
|
||||
RebootTimingObserver(bool flag, s64 interval) : start_tick(os::GetSystemTick()), flag(flag), interval(interval) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
bool IsRebootTiming() const {
|
||||
auto current_tick = os::GetSystemTick();
|
||||
return this->flag && (current_tick - this->start_tick).ToTimeSpan().GetSeconds() >= this->interval;
|
||||
return this->flag && (current_tick - this->start_tick).ToTimeSpan().GetMilliSeconds() >= this->interval;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue