Time a function: Difference between revisions

m
→‎{{header|Phix}}: added elapsed() example
m (→‎{{header|Phix}}: added elapsed() example)
Line 1,727:
<pre>0.02301709</pre>
=={{header|Phix}}==
Measures wall-clock time. On Windows the resolution is about 15ms. The elapsed function makes things more human-readable, eg 720 (seconds) => 12 minutes
<lang Phix>atom t0 = time()
some_procedure()
printf(1,"%3.2fs.\n",time()-t0)</lang>
printf(1,"%s\n",{elapsed(time()-t0)})</lang>
 
=={{header|Phixmonti}}==
7,804

edits