Simulation of the function from a NE555 timer chip. ;)
Create puls/flash or delay. On state change a callback function is fired. Delay fires callback only ones.