本文整理汇总了C++中TTimeIntervalMicroSeconds32类的典型用法代码示例。如果您正苦于以下问题:C++ TTimeIntervalMicroSeconds32类的具体用法?C++ TTimeIntervalMicroSeconds32怎么用?C++ TTimeIntervalMicroSeconds32使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TTimeIntervalMicroSeconds32类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
/*
* QS60KeyCapture provides media key handling using services from RemCon.
*/
QS60KeyCapture::QS60KeyCapture(CCoeEnv *env, QObject *parent):
QObject(parent), coeEnv(env), selector(0), target(0), handler(0)
{
initRemCon();
TTimeIntervalMicroSeconds32 initialTime;
TTimeIntervalMicroSeconds32 time;
coeEnv->WsSession().GetKeyboardRepeatRate(initialTime, time);
initialRepeatTime = (initialTime.Int() / 1000); // msecs
repeatTime = (time.Int() / 1000); // msecs
int clickTimeout = initialRepeatTime + repeatTime;
volumeUpClickTimer.setSingleShot(true);
volumeDownClickTimer.setSingleShot(true);
repeatTimer.setSingleShot(true);
volumeUpClickTimer.setInterval(clickTimeout);
volumeDownClickTimer.setInterval(clickTimeout);
repeatTimer.setInterval(initialRepeatTime);
connect(&volumeUpClickTimer, SIGNAL(timeout()), this, SLOT(volumeUpClickTimerExpired()));
connect(&volumeDownClickTimer, SIGNAL(timeout()), this, SLOT(volumeDownClickTimerExpired()));
connect(&repeatTimer, SIGNAL(timeout()), this, SLOT(repeatTimerExpired()));
}
示例2: INFO_PRINTF1
void CSmsReplyToStep::StartWatcherL()
{
INFO_PRINTF1(_L("Start the Watcher"));
if( WatchersAlreadyRunningL() )
{
INFO_PRINTF1(_L("Watchers are already running\n"));
return;
}
iWatchers = CTestUtilsWatcherStarter::NewL();
TTimeIntervalMicroSeconds32 wait = KWaitForWatchersToStart;
TBool started = EFalse;
while( !started && wait.Int() > 0 )
{
INFO_PRINTF2(_L("Waiting %d secs for watchers to start..."), wait.Int() / 1000000);
wait = wait.Int() - KWaitForWatchersToStartDisplayInterval.Int();
User::After(KWaitForWatchersToStartDisplayInterval);
started = WatchersAlreadyRunningL();
}
if( !WatchersAlreadyRunningL() )
{
INFO_PRINTF1(_L("WARNING: NBS Watcher has not started yet\n"));
}
}
示例3: DoRunSendingL
void CSmsCancelTest::DoRunSendingL()
{
CActiveScheduler::Stop();
if (!iOperation) //scheduled
{
TTimeIntervalMicroSeconds32 wait = 5000000;
iSmsTest.Printf(_L("\nWaiting %d seconds for SMSS to complete...\n\n"), wait.Int() / 1000000);
User::After(wait);
}
if (iStatus == KErrNone)
iStatus = iSmsTest.iProgress.iError;
iState = EStateWaiting;
iSmsTest.Printf(_L("Sending completed with error %d\n"), iStatus);
if (iStatus == KErrCancel)
{
iSmsTest.Printf(_L("Error %d is expected and OK\n"), iStatus);
iStatus = KErrNone;
}
iSmsTest.Printf(_L("Final Sending States of Messages:\n\n"), iStatus);
iSmsTest.DisplaySendingStatesL(*iSelection);
if (!iSmsTest.RunAuto())
{
iSmsTest.Test().Printf(_L("\nPress any key to continue...\n"));
iSmsTest.Test().Getch();
}
}
示例4: OstTraceExt3
// ---------------------------------------------------------------------------
// Configures the flex window sizes for both the initial delay and the
// consequent intervals after that.
// ---------------------------------------------------------------------------
//
EXPORT_C TInt CFlexPeriodic::Configure(
TTimeIntervalMicroSeconds32 aDelayWindow,
TTimeIntervalMicroSeconds32 aIntervalWindow )
{
OstTraceExt3( TRACE_NORMAL, CFLEXPERIODIC_CONFIGURE,
"CFlexPeriodic::Configure32;this=%x;"
"aDelayWindow=%d;aIntervalWindow=%d", ( TUint )this,
aDelayWindow.Int(), aIntervalWindow.Int() );
TTimeIntervalMicroSeconds32 zero( 0 );
__ASSERT_ALWAYS(aDelayWindow >= zero,
User::Panic(KCFlexPeriodicPanicCat,
EFlexPeriodicDelayWindowLessThanZero));
__ASSERT_ALWAYS(aIntervalWindow >= zero,
User::Panic(KCFlexPeriodicPanicCat,
EFlexPeriodicIntervalWindowLessThanZero));
// interval window is saved for later use. Delay window is sent
// immediately to server.
TInt ret = CFlexTimer::Configure( aDelayWindow );
if ( ret == KErrNone )
{
// Interval window is changed only, if configuration is successful.
iIntervalWindow = MAKE_TINT64( 0, aIntervalWindow.Int() );
iSendConfigure = ETrue;
}
return ret;
}
示例5: OstTraceExt4
// ---------------------------------------------------------------------------
// Starts the periodic timer. 32-bit delay and interval parameters.
// ---------------------------------------------------------------------------
//
EXPORT_C void CFlexPeriodic::Start( TTimeIntervalMicroSeconds32 aDelay,
TTimeIntervalMicroSeconds32 anInterval,
TCallBack aCallBack,
TCallBack aCallBackError )
{
OstTraceExt4( TRACE_NORMAL, CFLEXPERIODIC_START32,
"CFlexPeriodic::Start32;this=%x;aDelay=%d;"
"anInterval=%d;aCallBack=%x", ( TUint )this,
aDelay.Int(), anInterval.Int(), ( TUint )&( aCallBack ) );
TTimeIntervalMicroSeconds32 zero( 0 );
__ASSERT_ALWAYS(aDelay >= zero,
User::Panic(KCFlexPeriodicPanicCat,
EFlexPeriodicDelayLessThanZero));
__ASSERT_ALWAYS(anInterval > zero,
User::Panic(KCFlexPeriodicPanicCat,
EFlexPeriodicIntervalTooSmall));
__ASSERT_ALWAYS( aCallBack.iFunction != NULL,
User::Panic(KCFlexPeriodicPanicCat,
EFlexPeriodicCallbackFunctionIsNull));
// aCallBackError is left unasserted on purpose.
// if error occurs and callback is null client is paniced.
// Interval value is saved for later use, delay is sent immediately
// to the server.
iInterval = MAKE_TINT64( 0, anInterval.Int() );
iCallBack = aCallBack;
iCallBackError = aCallBackError;
CFlexTimer::After( aDelay );
}
示例6: IsDelayOk
// ---------------------------------------------------------------------------
TBool CTestRFlexTimer::IsDelayOk(
const TTimeIntervalMicroSeconds aDelay,
const TTimeIntervalMicroSeconds32 aInterval,
const TTimeIntervalMicroSeconds32 aWindow )
{
TTimeIntervalMicroSeconds interval( aInterval.Int() );
TTimeIntervalMicroSeconds window( aWindow.Int() );
return IsDelayOk( aDelay, interval, window );
}
示例7: SDL_StartTicks
void SDL_StartTicks(void)
{
/* Set first ticks value */
start = User::TickCount();
TTimeIntervalMicroSeconds32 period;
TInt tmp = UserHal::TickPeriod(period);
tickPeriodMilliSeconds = period.Int() / 1000;
}
示例8: ThreadSleepTicks
void ThreadSleepTicks(systick_t Ticks)
{
if (Ticks)
{
TTimeIntervalMicroSeconds32 n;
UserHal::TickPeriod(n);
Ticks *= n.Int();
}
User::After(Ticks);
}
示例9: requeuePrevious
TInt requeuePrevious(TAny * anArg)
//
// Requeue the previous entry (assumes previous entry is valid handle)
//
{
TTimeIntervalMicroSeconds32 tickPeriod;
UserHal::TickPeriod(tickPeriod);
const TInt K13Ticks = 13 * tickPeriod.Int();
TInt index=(TInt)anArg - 1;
theTimer->Queue(K13Ticks,TheTimers[index]);
return print(anArg);
}
示例10: requeue
TInt requeue(TAny * anArg)
//
// Note that a requeue will run once every 200 ms until stop is called.
//
{
TTimeIntervalMicroSeconds32 tickPeriod;
UserHal::TickPeriod(tickPeriod);
const TInt K13Ticks = 13 * tickPeriod.Int();
TInt index=(TInt)anArg;
theTimer->Queue(K13Ticks*2/3,TheTimers[index]);
return print(anArg);
}
示例11: QueueTimer
void CPhoneFactoryDummyBase::QueueTimer(TTsyTimer& aTsyTimer,
const TTsyReqHandle aTsyReqHandle,
TTimeIntervalMicroSeconds32 aTimeInMicroSeconds,
TInt (*aFunction)(TAny *aPtr),TAny* aPtr)
{
TCallBack callBackFn(aFunction,aPtr);
aTsyTimer.iEntry.Set(callBackFn);
aTsyTimer.iPending=ETrue;
aTsyTimer.iTsyReqHandle=aTsyReqHandle;
aTimeInMicroSeconds=aTimeInMicroSeconds.Int()+(KEtelTimerGranularity>>2);
if(aTimeInMicroSeconds.Int()<100000)
aTimeInMicroSeconds=aTimeInMicroSeconds.Int()+KEtelTimerGranularity;
iTimer->Queue(aTimeInMicroSeconds,aTsyTimer.iEntry);
}
示例12: Queue
void CWsDeltaTimer::Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds,TWsDeltaTimerEntry& anEntry)
{
TInt intervals=aTimeInMicroSeconds.Int()/CWsDeltaTimerGranularity;
if (intervals==0)
intervals=1;
iQueue.Add(anEntry,intervals);
}
示例13: KInterval
// ---------------------------------------------------------------------------
// TEST CASE: Start a timer using AfterTicks and wait it to expire.
// ---------------------------------------------------------------------------
//
TInt CTestRFlexTimer::ExpireAfterTicksL(
TTestResult& aResult,
CTestFlexTimer* /* aCallback */ )
{
__UHEAP_MARK;
const TTimeIntervalMicroSeconds32 KInterval( 3000000 ); // Time to wait timer
const TTimeIntervalMicroSeconds KWindow( 0 ); // Window for check results
const TTimeIntervalMicroSeconds32 KOneTick( 1000000 / 64 ); // System tick: 1/64 sec
// Initialize case
aResult.SetResult( KErrGeneral, _L("Test case leaved") );
TTime startTime;
startTime.UniversalTime();
TRequestStatus status;
// Do the actual test
//-----------------------------------------------------
RFlexTimer timer;
User::LeaveIfError( timer.Connect() );
timer.AfterTicks( status, KInterval.Int() / KOneTick.Int() );
// // ___ _____
User::WaitForRequest( status ); // // // //_ // // //
//_//_// // // // //
timer.Close();
//-----------------------------------------------------
// Verify the test
TTime endTime;
endTime.UniversalTime();
aResult.SetResult( KErrNone, _L("Test case passed") );
if ( !IsDelayOk( endTime.MicroSecondsFrom( startTime ), KInterval, KWindow ) )
{
aResult.SetResult( KErrGeneral, _L("Test case failed. Wrong expiration.") );
}
__UHEAP_MARKEND;
return KErrNone;
}
示例14: SetTimer
void CObexPacketTimer::SetTimer(TTimeIntervalMicroSeconds32 anInterval)
{
//Check if a timeout should be started on the request packet.
if(anInterval.Int()>KLowestPossibleTimerValue)
{
Cancel();
After(anInterval);
}
}
示例15:
void CTestCase0676::ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps aStep)
{
LOG_VERBOSE2(_L("Wait %dms before drop VBus"), (TInt)(aMicroSecs.Int()/1000));
if(gVerboseOutput)
{
OstTrace1(TRACE_VERBOSE, CTESTCASE0676_CONTINUEAFTER, "Wait %dms before drop VBus", (TInt)(aMicroSecs.Int()/1000));;
}
iTimer.After(iStatus, aMicroSecs);
iCaseStep = aStep;
SetActive();
}