#pragma once
/*
Copyright (c) 2013-2021 Devine Lu Linvega
2018 web port by rezmason
2021 C89 port by rezmason
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/
/*
This module implements delays— functions to be called
at some point in the future.
*/
typedef struct {
double endTime;
void (*onComplete)(void *data);
void *data;
} Delay;
void Delays_Init(int numDelays);
void Delays_Quit();
int Delays_Add(double duration, void (*onComplete)(), void *data);
void Delays_Cancel(int uid, int complete);
void Delays_Update(double totalTime);