Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Time-a-function/Pike/time-a-function.pike
Normal file
12
Task/Time-a-function/Pike/time-a-function.pike
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue