Search code examples
timeparipari-gp

How to implement time in Pari/GP


I have Pari/GP 32-bit and would like to implement any type of code which runs for a limited amount of time, then automatically stops if nothing is produced by that time. Here is a pseudocode example:

command
...
run command
if run time over 3 minutes
automatically interrupt the program and stop running

I know there is a basic way to do this, I just never found it in the PARI/GP guide. Any help? Thanks.


Solution

  •  alarm(5);for(i=1,10^10,continue)