Add support for generating heartbeat interrupts using a poll based counter (useful for environments which don't support asynchronous interrupts, such as the emscripten compiler)