AbsoluteTiming

AbsoluteTiming[expr]

evaluates expr, returning a list of the absolute number of seconds in real time that have elapsed, together with the result obtained.

Details

Examples

Basic Examples  (2)

Get the total time to do a computation:

In[1]:=
Click for copyable input
Out[1]=

Timing just reports CPU time used:

In[2]:=
Click for copyable input
Out[2]=

AbsoluteTiming takes into account all time, including getting data over the internet if needed:

In[1]:=
Click for copyable input
Out[1]=

The second time it is run is faster since the data has been saved for immediate reuse:

In[2]:=
Click for copyable input
Out[2]=

See Also

Timing  RepeatedTiming  EvaluationData  TimeConstrained  SessionTime  AbsoluteTime  TimeConstraint  $TimeUnit  PingTime  URLResponseTime

Tutorials

Introduced in 2003
(5.0)