Concord - C Discord API library
A Discord API wrapper library written in C
discord_timer Struct Reference

struct used for modifying, and getting info about a timer More...

#include <discord.h>

Collaboration diagram for discord_timer:
[legend]

Data Fields

unsigned id
 
enum discord_timer_flags flags
 
discord_ev_timer on_tick
 
discord_ev_timer on_status_changed
 
void * data
 
int64_t delay
 
int64_t interval
 
int64_t repeat
 

Detailed Description

struct used for modifying, and getting info about a timer

Examples
timers.c.

Field Documentation

◆ id

unsigned discord_timer::id

the identifier used for the timer. 0 creates a new timer

Examples
timers.c.

◆ flags

enum discord_timer_flags discord_timer::flags

the flags used to manipulate the timer

Examples
timers.c.

◆ on_tick

discord_ev_timer discord_timer::on_tick

(nullable) the callback that should be called when timer triggers

◆ on_status_changed

discord_ev_timer discord_timer::on_status_changed

(nullable) the callback for status updates timer->flags will have: DISCORD_TIMER_CANCELED, and DISCORD_TIMER_DELETE

◆ data

void* discord_timer::data

user data

Examples
timers.c.

◆ delay

int64_t discord_timer::delay

delay before timer should start

Examples
timers.c.

◆ interval

int64_t discord_timer::interval

interval that the timer should repeat at. must be >= 0

Examples
timers.c.

◆ repeat

int64_t discord_timer::repeat

how many times a timer should repeat (-1 == infinity)

Examples
timers.c.

The documentation for this struct was generated from the following file: