RosettaCodeData/Task/Time-a-function/Pike/time-a-function.pike

13 lines
227 B
Text
Raw Permalink Normal View History

2020-02-17 23:21:07 -08:00
void get_some_primes()
{
int i;
while(i < 10000)
i = i->next_prime();
}
void main()
{
float time_wasted = gauge( get_some_primes() );
write("Wasted %f CPU seconds calculating primes\n", time_wasted);
}