summaryrefslogtreecommitdiff
path: root/src/periodic.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-20 15:48:22 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-20 15:48:22 +0200
commit3711a2fb7e84abf9ee9734d81e1f49f9a1f8877d (patch)
tree2038ed9a8e5cde267ad0b9b51bf69e25ee056bb5 /src/periodic.h
parente009da58e2184ed209d118acd8343ae47276eae1 (diff)
Periodic: Use a thread instead of timers
This still doesn't solve the strange refresh time issue. Perhaps it's better to find a solution that doesn't rely on background threads.
Diffstat (limited to 'src/periodic.h')
-rw-r--r--src/periodic.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/periodic.h b/src/periodic.h
index acb00aa2..c643a2fe 100644
--- a/src/periodic.h
+++ b/src/periodic.h
@@ -24,12 +24,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
24#include <the_Foundation/sortedarray.h> 24#include <the_Foundation/sortedarray.h>
25 25
26iDeclareType(Periodic) 26iDeclareType(Periodic)
27iDeclareType(Thread)
27 28
28/* Animation utility. Not per frame but several times per second. */ 29/* Animation utility. Not per frame but several times per second. */
29struct Impl_Periodic { 30struct Impl_Periodic {
30 int timer;
31 iMutex * mutex; 31 iMutex * mutex;
32 iSortedArray commands; 32 iSortedArray commands;
33 iCondition haveCommands;
34 iThread * thread;
35 iAtomicInt isStopping;
33}; 36};
34 37
35void init_Periodic (iPeriodic *); 38void init_Periodic (iPeriodic *);