Bug fix for get_time_remaining function

This commit is contained in:
2024-06-01 15:31:27 +05:30
parent a2dc93136a
commit ca9002946f
4 changed files with 33 additions and 11 deletions

20
include/WheelTimer.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef __WHEEL_TIMER_H
#define __WHEEL_TIMER_H
#include <pthread.h>
typdedef struct _wheel_timer_t {
int current_clock_tic; /*Pointer to current slot, pointed by clock tic*/
int clock_tic_interval; /*Time interval of each clock tick*/
int wheel_size; /*No. of slots in wheel timer*/
int current_cycle_no; /*No. of rotation completed by wheel timer clock tic*/
pthread_t wheel_thread; /*Thread where the wheel timer clock run separately*/
/*@@@@@@@@@@@@*/
ll_t* slots[0]; /*Array of linked list, where each index in array represent a slot*/
/*@@@@@@@@@@@@*/
} wheel_timer_t;
#endif