Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer Wrapper Functions, and Refactoring #58

Merged
merged 24 commits into from
Apr 17, 2022
Merged

Conversation

Anotra
Copy link
Contributor

@Anotra Anotra commented Apr 13, 2022

What?

add DISCORD_TIMER_GET flag
add DISCORD_TIMER_INTERVAL_FIXED flag which causes a timer to run based upon it's original start time, instead of the current time
allow discord_timer_ctl to cancel timers
allow delay -1 to disable a timer after it has started

@Anotra
Copy link
Contributor Author

Anotra commented Apr 13, 2022

What?

added wrapper functions to make timers easier to manage

bool discord_timer_get(struct discord *client, unsigned id,
                                      struct discord_timer *timer);
bool discord_timer_start(struct discord *client, unsigned id);
bool discord_timer_stop(struct discord *client, unsigned id);
bool discord_timer_cancel(struct discord *client, unsigned id);
bool discord_timer_delete(struct discord *client, unsigned id);
bool discord_timer_cancel_and_delete(struct discord *client, unsigned id);

@Anotra Anotra force-pushed the timer branch 2 times, most recently from 1fc1432 to 6e8af35 Compare April 15, 2022 10:22
@Anotra Anotra marked this pull request as ready for review April 15, 2022 14:35
@Anotra Anotra changed the title Timer Timer Wrapper Functions, and Refactoring Apr 16, 2022
@lcsmuller lcsmuller merged commit 98ac7bb into Cogmasters:dev Apr 17, 2022
@Anotra Anotra deleted the timer branch April 29, 2022 18:18
@lcsmuller lcsmuller mentioned this pull request May 9, 2022
@lcsmuller lcsmuller mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants