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


C++ TTm类代码示例

本文整理汇总了C++中TTm的典型用法代码示例。如果您正苦于以下问题:C++ TTm类的具体用法?C++ TTm怎么用?C++ TTm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: OnStatus

//////////////////////////////////////
// Log-Notify
void TLogNotify::OnStatus(const TStr& MsgStr) {
	TTm NowTm = TTm::GetCurLocTm();
	Notify->OnStatus(TStr::Fmt("[%s %s] %s", 
		NowTm.GetYMDDashStr().CStr(), 
		NowTm.GetHMSTColonDotStr(true, false).CStr(), 
		MsgStr.CStr()));
}
开发者ID:adobekan,项目名称:qminer,代码行数:9,代码来源:ut.cpp

示例2: OnStatus

void TFileNotify::OnStatus(const TStr& MsgStr) {
	TTm NowTm = TTm::GetCurLocTm();
	File->PutStrFmt("[%s %s] %s\n", 
		NowTm.GetYMDDashStr().CStr(), 
		NowTm.GetHMSTColonDotStr(true, false).CStr(), 
		MsgStr.CStr());
	File->Flush();
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:8,代码来源:ut.cpp

示例3: OnAddRec

///////////////////////////////
// StayPoint detector aggregate
void TStayPointDetector::OnAddRec(const TRec& Rec) {
    // TODO logic
    State = TJsonVal::NewObj();
    State->AddToObj("status", 0);
    // dump parameters
    State->AddToObj("parameters", Params);
    // copy record
    TTm Timestamp; Rec.GetFieldTm(TimeFieldId, Timestamp);
    State->AddToObj("lastTimestamp",
        (double)TTm::GetUnixMSecsFromWinMSecs(Timestamp.GetMSecsFromTm(Timestamp)));
    State->AddToObj("lastLocationX", Rec.GetFieldFltPr(LocationFieldId).Val1);
    State->AddToObj("lastLocationY", Rec.GetFieldFltPr(LocationFieldId).Val2);
    State->AddToObj("lastAccuracy", Rec.GetFieldByte(AccuracyFieldId));

}
开发者ID:cfortuna,项目名称:qminer,代码行数:17,代码来源:geospatial_aggr.cpp

示例4: if

void TFileNotify::OnNotify(const TNotifyType& Type, const TStr& MsgStr){
	TStr TypeStr = "";
	if (Type==ntInfo) TypeStr = "INFO";
	else if (Type == ntErr) TypeStr = "ERROR";
	else if (Type == ntWarn) TypeStr = "WARNING";
	else if (Type == ntStat) TypeStr = "STAT";

	TTm NowTm = TTm::GetCurLocTm();
	
	File->PutStrFmt("[%s %s] %s: %s\n", 
		NowTm.GetYMDDashStr().CStr(), 
		NowTm.GetHMSTColonDotStr(true, false).CStr(), 
		TypeStr.CStr(),
		MsgStr.CStr());
	File->Flush();
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:16,代码来源:ut.cpp

示例5: GetMSecsFromTm

uint64 TSysTm::GetMSecsFromTm(const TTm& Tm){
  SYSTEMTIME SysTm; FILETIME FileTm;
  SysTm.wYear=WORD(Tm.GetYear());
  SysTm.wMonth=WORD(Tm.GetMonth());
  SysTm.wDayOfWeek=WORD(Tm.GetDayOfWeek());
  SysTm.wDay=WORD(Tm.GetDay());
  SysTm.wHour=WORD(Tm.GetHour());
  SysTm.wMinute=WORD(Tm.GetMin());
  SysTm.wSecond=WORD(Tm.GetSec());
  SysTm.wMilliseconds=WORD(Tm.GetMSec());
  ESAssert(SystemTimeToFileTime(&SysTm, &FileTm));
  TUInt64 UInt64(uint(FileTm.dwHighDateTime), uint(FileTm.dwLowDateTime));
  return UInt64.Val/uint64(10000);
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:14,代码来源:os.cpp

示例6: GetTimeZoneInformation

TTm TSysTm::GetLocTmFromUniTm(const TTm& Tm){
  // get time-zone information
  TIME_ZONE_INFORMATION TzInf;
  GetTimeZoneInformation(&TzInf);
  // get system time
  SYSTEMTIME UniSysTm;
  UniSysTm.wYear=WORD(Tm.GetYear());
  UniSysTm.wMonth=WORD(Tm.GetMonth());
  UniSysTm.wDayOfWeek=WORD(Tm.GetDayOfWeek());
  UniSysTm.wDay=WORD(Tm.GetDay());
  UniSysTm.wHour=WORD(Tm.GetHour());
  UniSysTm.wMinute=WORD(Tm.GetMin());
  UniSysTm.wSecond=WORD(Tm.GetSec());
  UniSysTm.wMilliseconds=WORD(Tm.GetMSec());
  // convert system-time
  SYSTEMTIME LocSysTm;
  SystemTimeToTzSpecificLocalTime(&TzInf, &UniSysTm, &LocSysTm);
  // return local-time
  return TTm(LocSysTm.wYear, LocSysTm.wMonth, LocSysTm.wDay, LocSysTm.wDayOfWeek,
   LocSysTm.wHour, LocSysTm.wMinute, LocSysTm.wSecond, LocSysTm.wMilliseconds);
}
开发者ID:SherlockYang,项目名称:Archive,代码行数:21,代码来源:os.cpp

示例7: GetFolderNameForCurrentTime

TStr TBackupProfile::GetFolderNameForCurrentTime() const
{
    TTm Now = TTm::GetCurLocTm();
    return Now.GetYMDDashStr() + " " + TStr::Fmt("%02d-%02d-%02d", Now.GetHour(), Now.GetMin(), Now.GetSec());
}
开发者ID:Bradeskojest,项目名称:qminer,代码行数:5,代码来源:folderbackup.cpp

示例8: AbsSecs

TSecTm::TSecTm(const TTm& Tm): AbsSecs(
 TSecTm(Tm.GetYear(), Tm.GetMonth(), Tm.GetDay(), Tm.GetHour(),
   Tm.GetMin(), int(TMath::Round(Tm.GetSec()*1000+Tm.GetMSec()))).GetAbsSecs()){}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:3,代码来源:tm.cpp

示例9: GetDateTimeIntFromTm

uint TTm::GetDateTimeIntFromTm(const TTm& Tm) {
    return GetDateTimeInt(Tm.GetYear(), Tm.GetMonth(),
        Tm.GetDay(), Tm.GetHour(), Tm.GetMin());
}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:4,代码来源:tm.cpp

示例10: GetYearIntFromTm

uint TTm::GetYearIntFromTm(const TTm& Tm) {
    return GetDateTimeInt(Tm.GetYear());
}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:3,代码来源:tm.cpp

示例11: AbsSecs

TSecTm::TSecTm(const TTm& Tm): AbsSecs(
 TSecTm(Tm.GetYear(), Tm.GetMonth(), Tm.GetDay(), Tm.GetHour(),
   Tm.GetMin(), Tm.GetSec()).GetAbsSecs()) { }
开发者ID:jethrotan,项目名称:qminer,代码行数:3,代码来源:tm.cpp

示例12: GetDateTimeIntFromTm

uint TTm::GetDateTimeIntFromTm(const TTm& Tm) {
    return Tm.IsDef() ? 
		GetDateTimeInt(Tm.GetYear(), Tm.GetMonth(),
        Tm.GetDay(), Tm.GetHour(), Tm.GetMin(), Tm.GetSec()) : 0;
}
开发者ID:jethrotan,项目名称:qminer,代码行数:5,代码来源:tm.cpp

示例13: GetYearIntFromTm

uint TTm::GetYearIntFromTm(const TTm& Tm) {
    return Tm.IsDef() ? GetDateTimeInt(Tm.GetYear()) : 0;
}
开发者ID:jethrotan,项目名称:qminer,代码行数:3,代码来源:tm.cpp


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