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

@@ -24,6 +24,5 @@ int block_init(block *const block);
int block_deinit(block *const block);
int block_execute(block *const block, const uint8_t button);
int block_update(block *const block);
bool block_must_run(const block *const block, const unsigned int time);
#endif // BLOCK_H

View File

@@ -7,7 +7,6 @@ typedef struct {
bool is_debug_mode;
} cli_arguments;
int cli_init(cli_arguments* const args, const char* const argv[],
const int argc);
cli_arguments cli_parse_arguments(const char* const argv[], const int argc);
#endif // CLI_H

View File

@@ -2,6 +2,7 @@
#define TIMER_H
#include <signal.h>
#include <stdbool.h>
#include "block.h"
@@ -15,5 +16,6 @@ typedef struct {
timer timer_new(const block *const blocks, const unsigned short block_count);
int timer_arm(timer *const timer);
bool timer_must_run_block(const timer *const timer, const block *const block);
#endif // TIMER_H