Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Tuning & Debugging > Time Measurement & Optimization > $TimeUnit >
Mathematica > Data Manipulation > Date & Time > Time Measurement & Optimization > $TimeUnit >

$TimeUnit

$TimeUnit
gives the minimum time interval in seconds recorded on your computer system.
  • Typical values for $TimeUnit are 1/100 and 1/1000.
  • In some functions the actual time granularity may be much smaller than $TimeUnit.
The timing granularity on this machine:
When a computation takes less than $TimeUnit seconds, repeat to get a better timing:
Divide by the number of repetitions to get the average timing:
You may want to time just a part of the computation:
The timing granularity on this machine:
In[1]:=
Click for copyable input
Out[1]=
 
When a computation takes less than $TimeUnit seconds, repeat to get a better timing:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Divide by the number of repetitions to get the average timing:
In[4]:=
Click for copyable input
Out[4]=
You may want to time just a part of the computation:
In[5]:=
Click for copyable input
Out[5]=
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF