当前位置: 首页>>代码示例>>C++>>正文


C++ TDateTime::Second方法代码示例

本文整理汇总了C++中TDateTime::Second方法的典型用法代码示例。如果您正苦于以下问题:C++ TDateTime::Second方法的具体用法?C++ TDateTime::Second怎么用?C++ TDateTime::Second使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDateTime的用法示例。


在下文中一共展示了TDateTime::Second方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CompareDate

TBool CHttpHdrTest::CompareDate(TDateTime aDate1, TDateTime aDate2)
	{
	return ((aDate1.Year() == aDate2.Year()) &&
			(aDate1.Month() == aDate2.Month()) &&
			(aDate1.Day() == aDate2.Day()) &&
			(aDate1.Hour() == aDate2.Hour()) &&
			(aDate1.Minute() == aDate2.Minute()) &&
			(aDate1.Second() == aDate2.Second()) &&
			(aDate1.MicroSecond() == aDate2.MicroSecond()));
	}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:10,代码来源:t_httphdr.cpp

示例2: TimerExpired

void CBuddycloudListComponent::TimerExpired(TInt aExpiryId) {
	if(aExpiryId == KDragTimerId) {
#ifdef __SERIES60_40__		
		if(iDraggingAllowed) {
			iDragVelocity = iDragVelocity * 0.95;		
			iScrollbarHandlePosition += TInt(iDragVelocity);		
			
			CBuddycloudListComponent::RepositionItems(false);
			RenderScreen();
			
			if(Abs(iDragVelocity) > 0.05) {
				iDragTimer->After(50000);
			}
		}
#endif
	}
	else if(aExpiryId == KTimeTimerId) {
#ifdef __3_2_ONWARDS__
		HBufC* aTitle = iEikonEnv->AllocReadResourceLC(R_LOCALIZED_STRING_APPNAME);
		SetTitleL(*aTitle);
		CleanupStack::PopAndDestroy();
#else
		TTime aTime;
		aTime.HomeTime();
		TBuf<32> aTextTime;
		aTime.FormatL(aTextTime, _L("%J%:1%T%B"));
	
		SetTitleL(aTextTime);
	
		TDateTime aDateTime = aTime.DateTime();
		iTimer->After((60 - aDateTime.Second() + 1) * 1000000);
#endif
	}
}
开发者ID:Persepoliss,项目名称:symbian-client,代码行数:34,代码来源:BuddycloudListComponent.cpp

示例3: LogDateTime

// ---------------------------------------------------------------------------
// TPresCondValidity::LogDateTime()
// ---------------------------------------------------------------------------
//
void TPresCondValidity::LogDateTime(TDateTime aDateTime)
    {
    OPENG_DP(D_OPENG_LIT( "         %d, %d, %d, %d, %d, %d, %d"),
                    aDateTime.Year(), aDateTime.Month()+1, aDateTime.Day()+1,
                    aDateTime.Hour(), aDateTime.Minute(), aDateTime.Second(),
                                                    aDateTime.MicroSecond() );
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:11,代码来源:prescondvalidity.cpp

示例4: WriteSolutionTagL

// -----------------------------------------------------------------------------
// CCapInfo::WriteSolutionTagL()
// Writes SyncSolutionsService solution data to capability object.
// -----------------------------------------------------------------------------
//
void CCapInfo::WriteSolutionTagL( const TDesC& aContentName,
        const TSConSolutionInfo& aSolution )
    {
    TRACE_FUNC_ENTRY;
    _LIT( KFormatUID, "UID=0x%08x" );
    _LIT( KFormatName, "Name=%S" );
    _LIT( KFormatDate, "Timestamp=%04d%02d%02dT%02d%02d%02dZ" );
    
    WriteTagL( EExt, TXmlParser::EElementBegin );
    WriteValueL( EXNam, aContentName );
    
    TFileName temp;
    temp.Format( KFormatUID, aSolution.iUid );
    WriteValueL( EXVal, temp );
    
    temp.Format( KFormatName, &aSolution.iSolutionName );
    WriteValueL( EXVal, temp );
    
    if ( aSolution.iTime.Int64() != 0 )
        {
        // write time
        TDateTime time = aSolution.iTime.DateTime();
        temp.Format( KFormatDate, time.Year(), time.Month() + 1,
            time.Day() + 1, time.Hour(), time.Minute(), time.Second() );
        WriteValueL( EXVal, temp );
        
        }
    
    
    WriteTagL( EExt, TXmlParser::EElementEnd );
    TRACE_FUNC_EXIT;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:37,代码来源:capinfo.cpp

示例5: TTimeIntervalSeconds

static struct tm& as_struct_tm (const time_t& t, struct tm& res)
{
    TTime us = UNIX_BASE + TTimeIntervalSeconds(t);
    TDateTime dt = us.DateTime();

    res.tm_sec  = dt.Second();
    res.tm_min  = dt.Minute();
    res.tm_hour = dt.Hour();
    res.tm_mday = dt.Day() + 1;
    res.tm_mon  = dt.Month();
    res.tm_year = dt.Year() - 1900;

    // EPOC32 counts the year day as Jan 1st == day 1
    res.tm_yday = us.DayNoInYear() - 1;

    // EPOC32 counts the weekdays from 0==Monday to 6==Sunday
    res.tm_wday = us.DayNoInWeek() + 1;
    if (res.tm_wday==7)
        res.tm_wday=0;	// Sunday==0 in a struct tm

    // newlib just sets this field to -1
    // tm_isdst doesn't really make sense here since we don't
    // know the locale for which to interpret this time.

    res.tm_isdst = -1;

    return res;
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:28,代码来源:time.cpp

示例6: Debug

GLDEF_C void Debug( TRefByValue<const TDesC> aText, ... )
    {
    #ifdef WINS
    VA_LIST args;
    VA_START( args, aText );

    TBuf<KLogLineLength> buf;
    buf.FormatList( aText, args );

    RFileLogger logger;
    TInt ret=logger.Connect();
    if (ret==KErrNone)
        {
        logger.SetDateAndTime( EFalse,EFalse );
        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );       
        TBuf<KLogTimeFormatLength> timeStamp;
        TTime now;
        now.HomeTime();
        TDateTime dateTime;
        dateTime = now.DateTime();
        timeStamp.Format( KLogTimeFormat, 
            dateTime.Hour(), dateTime.Minute(),
            dateTime.Second(), dateTime.MicroSecond() );
        buf.Insert( 0, timeStamp );

        logger.Write(buf);
        }

    logger.Close();

    VA_END( args );
    #else
    RDebug::Print(aText);
    #endif
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:WPWAPAdapterMain.cpp

示例7: AddTime

void RTestExecuteLogServ::AddTime(TDes8& aLogBuffer)
	{
	TTime now;
	now.UniversalTime();
	TDateTime dateTime = now.DateTime();
	_LIT8(KFormat,"%02d:%02d:%02d:%03d ");
	// add the current time 
	aLogBuffer.AppendFormat(KFormat,dateTime.Hour(),dateTime.Minute(),dateTime.Second(),(dateTime.MicroSecond()/1000)); 
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:9,代码来源:client.cpp

示例8: AddTime

void CSerialWriter::AddTime(TDes8& aLogBuffer)
	{
	TTime now;
	now.UniversalTime();
	TDateTime dateTime = now.DateTime();
	_LIT8(KFormat,"%02d:%02d:%02d:%03d ");
	// add the current time 
	aLogBuffer.Append(KTEFNewLine) ; 
	aLogBuffer.AppendFormat(KFormat,dateTime.Hour(),dateTime.Minute(),dateTime.Second(),(dateTime.MicroSecond()/1000)); 
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:10,代码来源:serialwriter.cpp

示例9: WriteWithTimeStamp

void CSheduleServerLog::WriteWithTimeStamp(const TDesC& aText)
	{
	TBuf<200> buf;
	TTime now;
	now.HomeTime();
	TDateTime dateTime;
	dateTime = now.DateTime();
	buf.Format(_L("%02d.%02d:%02d:%06d "), dateTime.Hour(), dateTime.Minute(), dateTime.Second(), dateTime.MicroSecond());
	Write(buf);
	Write(aText);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:11,代码来源:SSCH_UTL.CPP

示例10: PrintCurrentTimeStamp

void CTe_RegConcurrentTestStepBase::PrintCurrentTimeStamp(TBool aStart)
	{
	TTime time;
	time.UniversalTime();
	TDateTime dateTime = time.DateTime();
	TBuf<32> timeBuf;
	timeBuf.Format(_L("%02d:%02d:%02d:%03d"), dateTime.Hour(), dateTime.Minute(), dateTime.Second(), dateTime.MicroSecond());
	TBuf<16> buf(aStart?_L("started"):_L("ended"));
	_LIT(KTimeFormat, "%S in server %S %S at %S");
	INFO_PRINTF5(KTimeFormat, &ConfigSection(), &GetServerName(), &buf, &timeBuf);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:11,代码来源:te_regconcurrentteststepbase.cpp

示例11: TestReportLog

LOCAL_C void TestReportLog(const TDesC8& aText)
	{
	TBuf8<200> buf;

	TTime now;
	now.UniversalTime();
	TDateTime dateTime;
	dateTime = now.DateTime();
	buf.Format(_L8 ("%02d.%02d:%02d:%06d "),dateTime.Hour(),dateTime.Minute(),dateTime.Second(),dateTime.MicroSecond());
	buf.AppendFormat(_L8("%S\015\012"),&aText);
	TestRpt.Write(buf);
	TestRpt.Flush();
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:13,代码来源:Te_LoopBackt_tsylb.cpp

示例12: difftime

CIpuTestHarness::~CIpuTestHarness()
//
//	D'tor
	{
	TTime endtime;
	endtime.UniversalTime();

	// Do resource handle leak test?
	if (iDoResourceLeakTest)
		ResourceLeakTest();

	//	End of tests - see if failed or ok
	if (iFailedTests->Count())
		{
		TestHarnessFailed();
		}
	else
		{
		TestHarnessComplete();
		}

	iFailedTests->ResetAndDestroy();
	delete iFailedTests;

	//	Log finish time
	TDateTime t = endtime.DateTime();
	LogIt(_L("Ended @ %d:%d:%d:%d"),t.Hour(),t.Minute(),t.Second(),t.MicroSecond());
	TTime difftime(endtime.Int64() - iStartTime.Int64());
	t = difftime.DateTime();
	LogIt(_L("Execution time %d:%d:%d:%d"),t.Hour(),t.Minute(),t.Second(),t.MicroSecond());

	//	Close logs and test harness
	iFlogger.CloseLog();
	
	// iTest test harness performs UHEAP MARK/UNMARK check upon creation/destruction
	//   therefore, it must be destroyed last since it is created first in 
	//   CIpuTestHarness
	iTest.Close();
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:39,代码来源:IpuTestHarness.cpp

示例13: StartTimer

// --------------------------------------------------------------------------
// CLocationGeoTagTimerAO::StartTimer
// --------------------------------------------------------------------------
//
void CLocationGeoTagTimerAO::StartTimer()
    {
    LOG ("CLocationGeoTagTimerAO::StartTimer(), begin");
    if(!IsActive())
        {
        TTime hometime;
        hometime.HomeTime();
        
        //Get the current time in Hour,Minute, Second
        TDateTime  currentDateTime = hometime.DateTime();
        TInt currentHr = currentDateTime.Hour(); 
        TInt currentMin = currentDateTime.Minute();
        TInt currentSec = currentDateTime.Second();
        
        //3 AM in seconds
        TInt targetTimeInSeconds = GEOTAGGING_TIME_IN_HOURS * HOUR_VALUE_IN_SECONDS;
        TInt timeDifference = 0;
        
        //Find the time difference in seconds between current time to 3.00 AM 
        //Either on same day or next day.
        if ( currentHr < GEOTAGGING_TIME_IN_HOURS )
        {
           timeDifference = targetTimeInSeconds - 
                    ( ( currentHr * HOUR_VALUE_IN_SECONDS  ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec );
        }
        else
        {
           timeDifference = ( 24 * HOUR_VALUE_IN_SECONDS - ( 
                    ( currentHr * HOUR_VALUE_IN_SECONDS ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec ) )  +
                    targetTimeInSeconds ;
        }
        
        //Add the time difference to current time to set the target time ( 3.00 AM )
        TTimeIntervalSeconds interval( timeDifference );
        TTime timeToSet;
        timeToSet.HomeTime();
        timeToSet+= interval;
        
        
         At( timeToSet );
        }
     LOG ("CLocationGeoTagTimerAO::StartTimer(), end");
     }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:47,代码来源:clocationgeotagtimerao.cpp

示例14: ConstructL

void CIpuTestHarness::ConstructL(const TDesC& aTitle)
//
//	Non-trivial c'tor
	{
	//	Create iFailedTests
	iFailedTests = new (ELeave) CArrayPtrFlat<CTestInfo> (KFailedTestsGranularity);

	//	Start up logging server connection
	TBuf<64> temp(aTitle);
	DefaultLogFileName(temp);
	CreateFlogger(temp, EFalse, EFalse);

	iStartTime.UniversalTime();
	TDateTime t = iStartTime.DateTime();
	LogIt(_L("Started @ %d:%d:%d:%d"),t.Hour(),t.Minute(),t.Second(),t.MicroSecond());

	// Find number of open resource handles
	TInt processHandleCount=0;
	RThread().HandleCount(processHandleCount,iStartHandleCount);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:20,代码来源:IpuTestHarness.cpp

示例15: MsDosDateTime

/*
-----------------------------------------------------------------------
-----------------------------------------------------------------------
*/
TUint32 CZipCompressor::MsDosDateTime( TTime aTime )
{
	TDateTime dateTime = aTime.DateTime();

	TUint8 day 		= dateTime.Day() + 1;
	TUint8 month 	= dateTime.Month() + 1;
	TUint8 year 	= dateTime.Year() - 1980;
	TUint8 seconds 	= dateTime.Second();
	TUint8 minutes 	= dateTime.Minute();
	TUint8 hours 	= dateTime.Hour();
	
	TUint32 date = 0;
	date |= ( year & 0x3f ) << 9;
	date |= ( month & 0x0f ) << 5;
	date |= ( day & 0x1f );
	date <<= 16;
	date |= ( hours & 0x1f ) << 11;
	date |= minutes << 5;
	date |= seconds >> 1;
	return date;
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:25,代码来源:CZipCompressor.cpp


注:本文中的TDateTime::Second方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。