<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="timer" module="max" category="Timing">
	<digest>
		Report elapsed time between two events
	</digest>
	<description>
		<o>timer</o> starts keeping time when a <m>bang</m> is sent to the left inlet. The right outlet can report elapsed time in milliseconds or one of the Max <link name="maxtime" module="core" type="vignette">time format</link> options, with the exception of notevalues.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			time
		</metadata>
		<metadata name="tag">
			Timing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Start of Interval to be Timed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				End of Interval to be Timed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Milliseconds Between bangs at Left and Right Inlets
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Formatted Value of Time Between bangs at Left and Right Inlets
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Starts or restarts the <o>timer</o>.				<br />
				<br />
				In right inlet: Sends out the time elapsed since the <o>timer</o> was started.
			</description>
		</method>
		<method name="clock">
			<arglist>
				<arg name="setclock-name" optional="0" type="symbol" />
			</arglist>
			<digest>
				Specify a named <m>setclock</m> object for timing
			</digest>
			<description>
				Use the <at>clock</at> message to specify a named <m>setclock</m> object for timing rather than by Max’s internal millisecond clock. The word <m>clock</m> by itself sets the <o>timer</o> object back to using Max’s regular millisecond clock.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="format" get="1" set="1" type="symbol" size="1">
			<digest>
				Time format
			</digest>
			<description>
				Set the time format to use for output (defult = milliseconds). Output may also be specified in one of the Max <link name="maxtime" module="core" type="vignette">time format</link> options with the exception of notevalues.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="7">
					<enumlist>
						<enum name="ticks">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="ms">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="bars.beats.units">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="samples">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hz">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="notevalues">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hh:mm:ss">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Format" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="transport" get="1" set="1" type="symbol" size="1">
			<digest>
				Master time transport
			</digest>
			<description>
				The name of a <o>transport</o> object with which to associate. By default, the global transport is used. This is used in the output format conversion. The transport does not need to be running for the conversion.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Transport Name" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="timer.png" caption="Report time between bang messages... A single event can report time, then restart timer" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="clocker" />
		<seealso name="cpuclock" />
		<seealso name="delay" />
		<seealso name="pipe" />
		<seealso name="setclock" />
		<seealso name="transport" />
		<seealso name="basicchapter19" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="float">
			<description>
				Out left outlet: When a <m>bang</m> is received in the right inlet, the time elapsed (in milliseconds) since the <o>timer</o> was started is sent out the outlet.
				<br />
				<br />
				Out right outlet: When a <m>bang</m> is received in the right inlet, the time elapsed (in the time format specified by the <at>format</at> attribute) since the <o>timer</o> was started is sent out the outlet.
			</description>
		</entry>
	</misc>
</c74object>
