A well, I guess it just limits CPU time and not run time - perhaps not what the OP wanted. Your script doesn't really use much CPU time (less than 0.03 on my machine), so it won't get killed.
That's fine for my applications, but perhaps not so good in the general application.
Comment on Re^3: Ending system() calls after certain time period.