mirror of
https://github.com/Hizenberg469/Timer-Library.git
synced 2026-04-19 17:52:26 +03:00
Bug fix for get_time_remaining function
This commit is contained in:
20
include/WheelTimer.h
Normal file
20
include/WheelTimer.h
Normal 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
|
||||
Reference in New Issue
Block a user