Delft University of Technology Dynamic task-based intermittent execution for energy-harvesting devices