236typedef struct timer_value {
263 return (
struct timespec){
265 .tv_nsec = (
long int)(time.ticks * 80),
323void timer_shutdown(
void);
Various common macros used throughout the codebase.
static uint32_t("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x)
Definition purupuru.h:96
void timer_disable_ints(int channel)
Disable timer interrupts.
int timer_prime(int channel, uint32_t speed, int interrupts)
Pre-initialize a timer channel, but do not start it.
int timer_running(int channel)
Checks whether a timer channel is running.
uint32_t timer_count(int channel)
Obtain the count of a timer channel.
int timer_start(int channel)
Start a timer channel.
int timer_stop(int channel)
Stop a timer channel.
void timer_enable_ints(int channel)
Enable high-priority timer interrupts.
int timer_ints_enabled(int channel)
Check whether interrupts are enabled on a timer channel.
int timer_clear(int channel)
Clear the underflow bit of a timer channel.
timer_primary_callback_t timer_primary_set_callback(timer_primary_callback_t callback)
Set the primary timer callback.
void timer_primary_wakeup(uint32_t millis)
Request a primary timer wakeup.
void(* timer_primary_callback_t)(irq_context_t *)
Primary timer callback type.
Definition timer.h:289
timer_val_t __dreamcast_get_ticks(void)
Get the current uptime of the system (in seconds and ticks).
static struct timespec arch_timer_gettime(void)
Get the current uptime of the system (in seconds and nanoseconds).
Definition timer.h:259
Interrupt and exception handling.
Architecture-specific structure for holding the processor state.
Definition irq.h:91
Structure that holds timer values in seconds + ticks.
Definition timer.h:236
uint32_t ticks
Number of ticks in the current second.
Definition timer.h:238
uint32_t secs
Number of seconds.
Definition timer.h:237
KOS-implementation of select C11 and POSIX extensions.