For further fun, get the code to play the lullaby, wait an exponentially distributed time with mean, say, 30 seconds, and then start again with 99% probability.
If you were using this on someone else, starting again would be mandatory. But the only way to build up hope that it will stop in yourself, when you know how the code works, is to add a small chance of stopping.
Edit: upon further consideration, the distribution should be Pareto or something with a similarly heavy tail.
For further fun, get the code to play the lullaby, wait an exponentially distributed time with mean, say, 30 seconds, and then start again with 99% probability.
If you were using this on someone else, starting again would be mandatory. But the only way to build up hope that it will stop in yourself, when you know how the code works, is to add a small chance of stopping.
Edit: upon further consideration, the distribution should be Pareto or something with a similarly heavy tail.