Symbian3/SDK/Source/GUID-27F345DA-7969-5B3B-B2BD-285CD168CF72.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-27F345DA-7969-5B3B-B2BD-285CD168CF72" xml:lang="en"><title>Timers And Timing Services Overview</title><shortdesc>Provides timers that asynchronously notify an application
after an interval or at a specific time.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-48022E0B-8764-4944-8CFF-5EE6956DBC7C"><title>Architectural
relationships</title> <p>The <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita"><apiname>User</apiname></xref> class in the
System Static Functions API provides simple functions to suspend a
thread for a given interval or until a specific time.</p> </section>
<section id="GUID-59820FCE-FEF5-4089-8B62-1E1D8328437A"><title>Description</title> <p>The API has three key concepts: simple timer, periodic timer,
and heartbeat timer. </p> </section>
<section id="GUID-4CD59C91-C827-4C5A-98D4-509CBD3948EA"><title>Simple
timer</title> <p>The simple timer produces an event at a given system
time or after a given interval. It is provided by <xref href="GUID-8A423EA2-4264-30C9-9579-0466994E6E88.dita"><apiname>RTimer</apiname></xref>. This service is wrapped in an active object by <xref href="GUID-5733DF34-5B54-3044-BBED-3BFECB7ACE7A.dita"><apiname>CTimer</apiname></xref>.</p> </section>
<section id="GUID-D44976FF-8171-47B8-A211-66541247F256"><title>Periodic
timer</title><p><b/> </p> <p>A periodic timer produces a sequence
of events at a specified interval. The application is called through
a callback (<xref href="GUID-6C5766BC-05DE-32A8-993D-6BB582931F43.dita"><apiname>TCallBack</apiname></xref>) when they occur. It is provided
by <xref href="GUID-3CECC9FC-58C1-3117-AAF2-FDF88341F56F.dita"><apiname>CPeriodic</apiname></xref>.</p> </section>
<section id="GUID-3D6DC89E-DE6A-4AE1-84E8-870AF4B70FC3"><title>Heartbeat
timer</title> <p>A heartbeat timer is similar to a periodic timer.
However, if the application is busy handling another event when the
timer event occurs, a periodic timer simple delays delivering the
event, while a heartbeat timer will inform the application that it
has missed the event. </p> <p>It is provided by <xref href="GUID-12C497F2-DB51-3740-972C-11ACD6501DAB.dita"><apiname>CHeartbeat</apiname></xref>. Applications are alerted to timer events through implementing an
interface <xref href="GUID-6DE7027A-54C0-33F1-B184-7070B1A85709.dita"><apiname>MBeating</apiname></xref>.</p> </section>
</conbody><related-links>
<link href="GUID-1294F540-FDA7-5050-BAFB-3C9888491B98.dita">
<linktext>Asynchronous Services Overview</linktext></link>
<link href="GUID-FF8F5D97-7D37-5F6B-84A3-C064E2FD53E0.dita"><linktext>System
Static Functions Overview</linktext></link>
</related-links></concept>