Skip to content

Timing

Timing[expr] returns a List with the first element being the time in seconds for the evaluation of expr, and the second element being the result.

Attributes[Timing] := {HoldAll, Protected, SequenceHold}

Simple examples

In[1]:= Timing[Sum[a, {a, 100000000}]]
Out[1]= {0.00167509, 5000000050000000}