Timer to group calls to appDb store() method
Compare changes
+ 33
− 0
@@ -33,6 +33,11 @@
@@ -90,6 +95,12 @@ static appDb_t appDb;
@@ -107,10 +118,32 @@ void AppDbInit(void)
Calls to store() are now non-blocking, and a timer is set to perform the write to persistent storage 5 seconds after the latest store() call. This makes persistent storage writes much less frequent.
This is the first attempt at a solution - a better approach is to put calls into a queue, the other end of which will be serviced by a worker task. Working on that next...