PHP <del>43</del> 40 bytes: =========================== I hope this is an acceptable answer: <del>set_time_limit($_REQUEST['t']);while(!0);</del> <?for(set_time_limit($_REQUEST['t']);;); I could do like this: `<?for(set_time_limit($_POST['t']);;);` but it would lose flexibility and 3 bytes. It's impossible to get key presses in php, without being on console, which I'm not targeting! To stop it, you MUST abort the process (stopping the page from loading might stop the code)! As a plus, it works in Android too! If you install a php server (free on Google Play). To make it work, simply do like this: You create a .php webpage and append `?t=<time in seconds>` to the end of the url or submit a post (using a form or even ajax).