fix: Fix timer logic for blocks

This commit is contained in:
Utkarsh Verma
2023-12-19 09:51:41 +05:30
parent c42a4215c8
commit 12d4decdd4
7 changed files with 36 additions and 29 deletions

View File

@@ -144,15 +144,3 @@ int block_update(block *const block) {
return 0;
}
bool block_must_run(const block *const block, const unsigned int time) {
if (time == 0) {
return true;
}
if (block->interval == 0) {
return false;
}
return time % block->interval == 0;
}