Time a function: Difference between revisions

Added 11l
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
(Added 11l)
Line 16:
This task is intended as a subtask for [[Measure relative performance of sorting algorithms implementations]].
<br><br>
 
=={{header|11l}}==
{{trans|Nim}}
 
<lang 11l>F do_work(x)
V n = x
L(i) 10000000
n += i
R n
 
F time_func(f)
V start = time:perf_counter()
f()
R time:perf_counter() - start
 
print(time_func(() -> do_work(100)))</lang>
 
=={{header|8051 Assembly}}==
1,481

edits