<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_timer_8h">
<title>/Users/bernard/b20/bsoft/include/timer.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/timer.h</primary></indexterm>
<para>

<para>Utilities for timing functions. </para>
 
</para>
<programlisting>#include &lt;time.h&gt;
#include &lt;sys/time.h&gt;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>double <link linkend="_timer_8h_1a9d4396bb8b35fd6ff2ce098f4de75d11">getwalltime</link> ()</para>

<para>Returns the current time. </para>
</listitem>
            <listitem><para>double <link linkend="_timer_8h_1a3a918a66857d74b374fe473cfbacab63">getcputime</link> ()</para>

<para>Returns the clock time. </para>
</listitem>
            <listitem><para>double <link linkend="_timer_8h_1a0dca0023b101997606be7c191ce513ce">timer_start</link> ()</para>

<para>Starts timer and prints the time. </para>
</listitem>
            <listitem><para>double <link linkend="_timer_8h_1a05f5f48c77f1fe525aa7bb733ac8cdaa">timer_report</link> (double lasttime)</para>

<para>Reports the time elapsed since a given time. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Utilities for timing functions. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20010316 </para>

<para>Modified: 20100726 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_timer_8h_1a3a918a66857d74b374fe473cfbacab63"/>    <section>
    <title>getcputime()</title>
<indexterm><primary>getcputime</primary><secondary>timer.h</secondary></indexterm>
<indexterm><primary>timer.h</primary><secondary>getcputime</secondary></indexterm>
<para><computeroutput>double getcputime ( )</computeroutput></para><para>

<para>Returns the clock time. </para>
</para>

<para><literallayout><computeroutput>The time format is in clock seconds since the start of the process.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>.</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double the clock time in seconds. </para>
</formalpara>
</para>
<para>
Definition at line 40 of file timer.cpp.</para>
    </section><anchor xml:id="_timer_8h_1a9d4396bb8b35fd6ff2ce098f4de75d11"/>    <section>
    <title>getwalltime()</title>
<indexterm><primary>getwalltime</primary><secondary>timer.h</secondary></indexterm>
<indexterm><primary>timer.h</primary><secondary>getwalltime</secondary></indexterm>
<para><computeroutput>double getwalltime ( )</computeroutput></para><para>

<para>Returns the current time. </para>
</para>

<para><literallayout><computeroutput>The time format is in seconds since Jan. 1, 1970, including microseconds.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>.</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double the current time in seconds. </para>
</formalpara>
</para>
<para>
Definition at line 23 of file timer.cpp.</para>
    </section><anchor xml:id="_timer_8h_1a05f5f48c77f1fe525aa7bb733ac8cdaa"/>    <section>
    <title>timer_report()</title>
<indexterm><primary>timer_report</primary><secondary>timer.h</secondary></indexterm>
<indexterm><primary>timer.h</primary><secondary>timer_report</secondary></indexterm>
<para><computeroutput>double timer_report (double lasttime)</computeroutput></para><para>

<para>Reports the time elapsed since a given time. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>lasttime</entry>
                                <entry>
<para>the given initial time. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double the current time. </para>
</formalpara>
</para>
<para>
Definition at line 67 of file timer.cpp.</para>
    </section><anchor xml:id="_timer_8h_1a0dca0023b101997606be7c191ce513ce"/>    <section>
    <title>timer_start()</title>
<indexterm><primary>timer_start</primary><secondary>timer.h</secondary></indexterm>
<indexterm><primary>timer.h</primary><secondary>timer_start</secondary></indexterm>
<para><computeroutput>double timer_start ( )</computeroutput></para><para>

<para>Starts timer and prints the time. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>.</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double the current time. </para>
</formalpara>
</para>
<para>
Definition at line 52 of file timer.cpp.</para>
</section>
</section>
</section>
