September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,7 +1,7 @@
|
|||
integer
|
||||
identity(integer x)
|
||||
{
|
||||
return x;
|
||||
x;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -16,25 +16,25 @@ sum(integer c)
|
|||
c -= 1;
|
||||
}
|
||||
|
||||
return s;
|
||||
s;
|
||||
}
|
||||
|
||||
|
||||
real
|
||||
time_f(integer (*fp) (integer), integer fa)
|
||||
time_f(integer (*fp)(integer), integer fa)
|
||||
{
|
||||
date f, s;
|
||||
time t;
|
||||
|
||||
d_now(s);
|
||||
s.now;
|
||||
|
||||
fp(fa);
|
||||
|
||||
d_now(f);
|
||||
f.now;
|
||||
|
||||
t_ddiff(t, f, s);
|
||||
t.ddiff(f, s);
|
||||
|
||||
return t_microsecond(t) / 1000000r;
|
||||
t.microsecond / 1000000r;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -46,5 +46,5 @@ main(void)
|
|||
o_real(6, time_f(sum, 1000000));
|
||||
o_text(" seconds\n");
|
||||
|
||||
return 0;
|
||||
0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue