Adaptation/GUID-10D79C75-6AB9-4717-87EF-057F19CB8283.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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 task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-10D79C75-6AB9-4717-87EF-057F19CB8283" xml:lang="en"><title>Time Implementation Guide</title><shortdesc>How to implement the Time platform service.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<prereq id="GUID-9237420C-294D-4A65-AB19-46BD17038B5D"><p>The Time
platform service specifies functions to get and set the current time.</p></prereq>
<context id="GUID-547ED715-ED71-486D-B9F2-CFD9E39C4E83"><p>To implement
the Time platform service, you implement the functions <xref href="GUID-DED2C0D0-EA27-3C02-8FF2-8CB5ADCC1170.dita"><apiname>RtcData()</apiname></xref> and <xref href="GUID-9926EDCB-DA2C-3D1C-9637-CB3147E7E97A.dita"><apiname>SetRtcData()</apiname></xref> in hardware.</p></context>
<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-2-1-10-1-5-1-10-1-1-8-1-3-1-3-3">
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-2-1-10-1-5-1-10-1-1-8-1-3-1-3-3-1"><cmd/>
<info><p>The function <xref href="GUID-9926EDCB-DA2C-3D1C-9637-CB3147E7E97A.dita"><apiname>SetRtcData()</apiname></xref> sets the state
of the real time clock to a passed in value. To implement it you write
that value to the RTC current time register. On Symbian platform,
the value should be the number of seconds that have elapsed since
the beginning of 2000.</p></info>
<stepresult><p>The platform now has a function to set the current
time in seconds.</p></stepresult>
</step>
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-2-1-10-1-5-1-10-1-1-8-1-3-1-3-3-2"><cmd/>
<info><p>The function <xref href="GUID-DED2C0D0-EA27-3C02-8FF2-8CB5ADCC1170.dita"><apiname>RtcData()</apiname></xref> returns the current
state of the real time clock. To implement it, you read the RTC current
time register and return that time as a <xref href="GUID-F9432D7B-41C9-3048-AC50-B5BCF8BE11D0.dita"><apiname>TUint</apiname></xref>.</p></info>
<stepresult><p>The current state of the real time clock is a <xref href="GUID-F9432D7B-41C9-3048-AC50-B5BCF8BE11D0.dita"><apiname>TUint</apiname></xref> containing the number of seconds since the beginning
of 2000.</p></stepresult>
</step>
</steps>
<result id="GUID-A265C295-5403-4C52-9CC1-8D004F06DC4A"><p>You have
now implemented the Time platform service in hardware.</p></result>
</taskbody><related-links>
<link href="GUID-8D237BD6-9759-4180-B190-F1624594017F.dita"><linktext>Time
Client Interface Tutorial — Using the Interface</linktext></link>
</related-links></task>