Symbian3/SDK/Source/GUID-EA6965FB-5BB6-5110-9A16-B5403E1983D4.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 7 51a74ef9ed63
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 concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-EA6965FB-5BB6-5110-9A16-B5403E1983D4" xml:lang="en"><title>How to
Wait for a Given Time</title><shortdesc>Explains how to use the <codeph>At()</codeph> function to wait.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Use the <codeph>At()</codeph> function to set the timer to complete at
a specific time.</p>
<p>The following example suspends the thread until the current time plus ten
seconds.</p>
<codeblock id="GUID-83E4B363-6E1B-5031-84EF-C3F2D104106B" xml:space="preserve">
// get current time (microseconds since 0AD nominal Gregorian)
TTime time; 
time.HomeTime();  

// add ten seconds to the time
TTimeIntervalSeconds timeIntervalSeconds(10);
time += timeIntervalSeconds;

// issue and wait
timer.At(timerStatus,time);
User::WaitForRequest(timerStatus);</codeblock>
</conbody></concept>