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