(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 4.0,
MathReader 4.0, or any compatible application. The data for the notebook 
starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do one of 
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      4961,        169]*)
(*NotebookOutlinePosition[      7746,        259]*)
(*  CellTagsIndexPosition[      7520,        246]*)
(*WindowFrame->Normal*)



Notebook[{
Cell[TextData[{
  "Utilities",
  StyleBox["`", "MB"],
  "ShowTime",
  StyleBox["`", "MB"]
}], "Subsection",
  CellTags->{"S6.13.1", "1.1"}],

Cell[TextData[{
  "The function ",
  StyleBox["ShowTime", "MR"],
  " uses the built\[Hyphen]in function ",
  StyleBox["Timing", "MR"],
  " to print timing information for each evaluation. After the package is \
loaded, ",
  StyleBox["ShowTime", "MR"],
  " is automatically applied to every evaluation. Automatic printing of \
timing information can be turned off using ",
  StyleBox["Off[ShowTime]", "MR"],
  " and turned back on using ",
  StyleBox["On[ShowTime]", "MR"],
  ". "
}], "Text",
  CellTags->{"S6.13.1", "1.2"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"ShowTime[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\
\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", "\<\"print \
the time required for evaluation of \
\\!\\(\\*StyleBox[\\\"\\\\\\\"expr\\\\\\\"\\\", \\\"TI\\\"]\\) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"On[ShowTime]\\\\\\\"\\\", \
\\\"MR\\\"]\\) \"\>", "\<\"print timing information for subsequent \
evaluations \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Off[ShowTime]\\\\\\\"\\\",\
 \\\"MR\\\"]\\) \"\>", "\<\"turn off automatic printing of timing information \
\"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S6.13.1", "1.3"}],

Cell["Automatic printing of timing information. ", "Caption",
  CellTags->"S6.13.1"],

Cell["This loads the package. ", "MathCaption",
  CellTags->{"S6.13.1", "1.4"}],

Cell["<< Utilities`ShowTime`", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S6.13.1"],

Cell["\<\
The time required to evaluate this numerical integral is printed \
before returning the result. \
\>", "MathCaption",
  CellTags->{"S6.13.1", "1.5"}],

Cell[CellGroupData[{

Cell["\<\
NIntegrate[x Exp[-x] Sin[x],
 {x, 0, Infinity}]\
\>", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S6.13.1"],

Cell[BoxData[
    \(0.020000000000000018`\ Second\)], "Print",
  CellTags->"S6.13.1"],

Cell[BoxData[
    \(0.5000000019522963`\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S6.13.1"]
}, Open  ]],

Cell["This turns automatic timing off. ", "MathCaption",
  CellTags->{"S6.13.1", "1.6"}],

Cell[CellGroupData[{

Cell["Off[ShowTime]", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S6.13.1"],

Cell[BoxData[
    \(0.`\ Second\)], "Print",
  CellTags->"S6.13.1"]
}, Open  ]],

Cell[TextData[{
  "Timing information is printed if ",
  StyleBox["ShowTime", "MR"],
  " is entered explicitly. "
}], "MathCaption",
  CellTags->{"S6.13.1", "1.7"}],

Cell[CellGroupData[{

Cell["ShowTime[Sum[1/n, {n, 1, 99}]]", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S6.13.1"],

Cell[BoxData[
    \(0.010000000000000009`\ Second\)], "Print",
  CellTags->"S6.13.1"],

Cell[BoxData[
    \(360968703235711654233892612988250163157207\/\
69720375229712477164533808935312303556800\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S6.13.1"]
}, Open  ]]
},
FrontEndVersion->"4.0 for X",
ScreenRectangle->{{0, 800}, {0, 600}},
WindowSize->{520, 455},
WindowMargins->{{140, Automatic}, {Automatic, 72}},
StyleDefinitions -> "HelpBrowser.nb"
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of 
the file.  The cache data will then be recreated when you save this file 
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "S6.13.1"->{
    Cell[1717, 49, 139, 6, 70, "Subsection",
      CellTags->{"S6.13.1", "1.1"}],
    Cell[1859, 57, 523, 15, 70, "Text",
      CellTags->{"S6.13.1", "1.2"}],
    Cell[2385, 74, 967, 20, 70, "Text",
      CellTags->{"S6.13.1", "1.3"}],
    Cell[3355, 96, 84, 1, 70, "Caption",
      CellTags->"S6.13.1"],
    Cell[3442, 99, 79, 1, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.4"}],
    Cell[3524, 102, 87, 2, 70, "Input",
      CellTags->"S6.13.1"],
    Cell[3614, 106, 159, 4, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.5"}],
    Cell[3798, 114, 120, 5, 70, "Input",
      CellTags->"S6.13.1"],
    Cell[3921, 121, 85, 2, 70, "Print",
      CellTags->"S6.13.1"],
    Cell[4009, 125, 101, 3, 70, "Output",
      CellTags->"S6.13.1"],
    Cell[4125, 131, 88, 1, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.6"}],
    Cell[4238, 136, 78, 2, 70, "Input",
      CellTags->"S6.13.1"],
    Cell[4319, 140, 67, 2, 70, "Print",
      CellTags->"S6.13.1"],
    Cell[4401, 145, 164, 5, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.7"}],
    Cell[4590, 154, 95, 2, 70, "Input",
      CellTags->"S6.13.1"],
    Cell[4688, 158, 85, 2, 70, "Print",
      CellTags->"S6.13.1"],
    Cell[4776, 162, 169, 4, 70, "Output",
      CellTags->"S6.13.1"]},
  "1.1"->{
    Cell[1717, 49, 139, 6, 70, "Subsection",
      CellTags->{"S6.13.1", "1.1"}]},
  "1.2"->{
    Cell[1859, 57, 523, 15, 70, "Text",
      CellTags->{"S6.13.1", "1.2"}]},
  "1.3"->{
    Cell[2385, 74, 967, 20, 70, "Text",
      CellTags->{"S6.13.1", "1.3"}]},
  "1.4"->{
    Cell[3442, 99, 79, 1, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.4"}]},
  "1.5"->{
    Cell[3614, 106, 159, 4, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.5"}]},
  "1.6"->{
    Cell[4125, 131, 88, 1, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.6"}]},
  "1.7"->{
    Cell[4401, 145, 164, 5, 70, "MathCaption",
      CellTags->{"S6.13.1", "1.7"}]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"S6.13.1", 5586, 186},
  {"1.1", 6853, 221},
  {"1.2", 6947, 224},
  {"1.3", 7036, 227},
  {"1.4", 7125, 230},
  {"1.5", 7219, 233},
  {"1.6", 7315, 236},
  {"1.7", 7410, 239}
  }
*)

(*NotebookFileOutline
Notebook[{
Cell[1717, 49, 139, 6, 70, "Subsection",
  CellTags->{"S6.13.1", "1.1"}],
Cell[1859, 57, 523, 15, 70, "Text",
  CellTags->{"S6.13.1", "1.2"}],
Cell[2385, 74, 967, 20, 70, "Text",
  CellTags->{"S6.13.1", "1.3"}],
Cell[3355, 96, 84, 1, 70, "Caption",
  CellTags->"S6.13.1"],
Cell[3442, 99, 79, 1, 70, "MathCaption",
  CellTags->{"S6.13.1", "1.4"}],
Cell[3524, 102, 87, 2, 70, "Input",
  CellTags->"S6.13.1"],
Cell[3614, 106, 159, 4, 70, "MathCaption",
  CellTags->{"S6.13.1", "1.5"}],

Cell[CellGroupData[{
Cell[3798, 114, 120, 5, 70, "Input",
  CellTags->"S6.13.1"],
Cell[3921, 121, 85, 2, 70, "Print",
  CellTags->"S6.13.1"],
Cell[4009, 125, 101, 3, 70, "Output",
  CellTags->"S6.13.1"]
}, Open  ]],
Cell[4125, 131, 88, 1, 70, "MathCaption",
  CellTags->{"S6.13.1", "1.6"}],

Cell[CellGroupData[{
Cell[4238, 136, 78, 2, 70, "Input",
  CellTags->"S6.13.1"],
Cell[4319, 140, 67, 2, 70, "Print",
  CellTags->"S6.13.1"]
}, Open  ]],
Cell[4401, 145, 164, 5, 70, "MathCaption",
  CellTags->{"S6.13.1", "1.7"}],

Cell[CellGroupData[{
Cell[4590, 154, 95, 2, 70, "Input",
  CellTags->"S6.13.1"],
Cell[4688, 158, 85, 2, 70, "Print",
  CellTags->"S6.13.1"],
Cell[4776, 162, 169, 4, 70, "Output",
  CellTags->"S6.13.1"]
}, Open  ]]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)

