Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Time-a-function/Oz/time-a-function.oz
Normal file
19
Task/Time-a-function/Oz/time-a-function.oz
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
declare
|
||||
%% returns milliseconds
|
||||
fun {TimeIt Proc}
|
||||
Before = {Now}
|
||||
in
|
||||
{Proc}
|
||||
{Now} - Before
|
||||
end
|
||||
|
||||
fun {Now}
|
||||
{Property.get 'time.total'}
|
||||
end
|
||||
in
|
||||
{Show
|
||||
{TimeIt
|
||||
proc {$}
|
||||
{FoldL {List.number 1 1000000 1} Number.'+' 4 _}
|
||||
end}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue