This can be accomplished with only a Dashboard Widget or a combination of a Dashboard Widget and Function. Within these options, there are a few different ways to do this. I’ll go through what immediately comes to mind, from easiest to most complex:
Widgets and Functions can act in unison, where the widget can get status updates from Functions. The Function can count down and also perform additional acts like email notification, etc. at the end of the countdown, and the widget can query the Function for a response string that it displays on the dashboard. See Mycodo/mycodo/widgets/widget_function_status.py and Mycodo/mycodo/function/examples/custom_function_simple_loop_with_status.py for how the Widget and Function can interact.
If these are in the example directory, you will need to import the module on the Configure → Custom Widget and Custom Function pages. I’ve been thinking about having all example modules included automatically as an imported module so users can add and play with them in Mycodo without going through the import process, and have them clearly labeled “Example Module” or similar when they’re in the Widget or Function dropdown menu for adding a widget/function.