RosettaCodeData/Task/Time-a-function/Oz/time-a-function.oz
2023-07-01 13:44:08 -04:00

19 lines
273 B
Text

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}
}