Retain true-value of button for x seconds

Actually I found one that fits my needs: How to run a GHPython infinite while loop with Timer - Scripting - McNeel Forum