There is a timer functionality in Singular. You can use it in the
following way:
Code:
> int t=timer; // t saves the value of the timer at the beginning
> ......
> timer-t; // elapsed time is timer minus saved timer value
Alternatively, you may use the timer as in the following example:
Code:
> system("--min-time", "0.001");
> timer=1;
> ring r=0,x,dp;
> number n=1234567;
> number m=n^100000;
//used time: 0.10 sec
> number mm=m^2;
//used time: 0.14 sec
If you are on a Windows Operating System, the value of timer might not
always be correct. There you need to use the
Code:
rtimer
command instead.
You can find further explanations and examples in the documentation
of Singular (entering help timer; or help rtimer;).
Christoph Lossen
(Singular Team)