这篇教程C++ GetTimeStamp函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetTimeStamp函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTimeStamp函数的具体用法?C++ GetTimeStamp怎么用?C++ GetTimeStamp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetTimeStamp函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: FrameTimeLogFrameScheduler::FrameScheduler(std::ostream *_LogDestination, Whole StartingThreadCount) : FrameTimeLog(MEZZ_FRAMESTOTRACK), PauseTimeLog(MEZZ_FRAMESTOTRACK), CurrentFrameStart(GetTimeStamp()), CurrentPauseStart(GetTimeStamp()), LogDestination(_LogDestination), Sorter(0),#ifdef MEZZ_USEBARRIERSEACHFRAME StartFrameSync(StartingThreadCount), EndFrameSync(StartingThreadCount), LastFrame(0),#endif#ifdef MEZZ_USEATOMICSTODECACHECOMPLETEWORK DecacheMain(0), DecacheAffinity(0),#endif CurrentThreadCount(StartingThreadCount), FrameCount(0), TargetFrameLength(16666), TimingCostAllowance(0), MainThreadID(this_thread::get_id()), LoggingToAnOwnedFileStream(false), NeedToLogDeps(true){ Resources.push_back(new DefaultThreadSpecificStorage::Type(this)); (*LogDestination) << "<MezzanineLog>" << std::endl; LogDestination->flush();}
开发者ID:BlackToppStudios,项目名称:DAGFrameScheduler,代码行数:27,
示例2: optic_flowvoid optic_flow( cv::Mat mGray1, cv::Mat mGray2, cv::Mat& flow, cv::Mat& mAnnotated ){ cv::Mat frame1_gray, frame2_gray; cv::UMat flowUmat; struct timeval start1,end1; start1 = GetTimeStamp(); calcOpticalFlowFarneback(mGray1, mGray2, flowUmat, 0.5, 3, 15, 3, 5, 1.2, 0); flowUmat.copyTo(flow); for (int y = 0; y < mAnnotated.rows; y += 5) for (int x = 0; x < mAnnotated.cols; x += 5) { // get the flow from y, x position * 10 for better visibility const cv::Point2f flowatxy = flow.at<cv::Point2f>(y, x) * 10; // draw line at flow direction line(mAnnotated, cv::Point(x, y), cv::Point( cvRound(x + flowatxy.x), cvRound(y + flowatxy.y)), cv::Scalar(255,0,0)); // draw initial point circle(mAnnotated, cv::Point(x, y), 1, cv::Scalar(0, 0, 0), -1); } end1 = GetTimeStamp(); float delta = ((end1.tv_sec-start1.tv_sec)*1000 - (end1.tv_usec - start1.tv_usec)); printf("OpticalFlowFarneback() Duration = %8.3f/n", delta/1000 );}
开发者ID:stenniswood,项目名称:bk_code,代码行数:28,
示例3: QdplusBarometerThreadTHREAD_FUNC QdplusBarometerThread(void *argptr){INT32 i, value, missed;struct { ISIDL_TIMESTAMP prev; ISIDL_TIMESTAMP crnt;} ttag;BAROMETER *bp;static char *fid = "QdplusBarometerThread"; LogMsg(LOG_DEBUG, "%s started", fid); bp = (BAROMETER *) argptr; bp->nsamp = 0;/* Time tag the current sample and stuff it into the buffer */ GetTimeStamp(&ttag.prev); while (1) { GetTimeStamp(&ttag.crnt); if (ttag.crnt.sys > ttag.prev.sys) { value = GetSample(bp); missed = ttag.crnt.sys - ttag.prev.sys - 1; for (i = 0; i < missed; i++) { ++ttag.prev.sys; StuffSample(bp, &ttag.prev, MISSED_BAROMETER_SAMPLE); } StuffSample(bp, &ttag.crnt, value); ttag.prev = ttag.crnt; } utilDelayMsec(250); }}
开发者ID:jandog8990,项目名称:asl-station-processor,代码行数:34,
示例4: test_chipbool test_chip(char chipid[]){ nEntry++; g_chipdata.Invalidate(); g_chipdata.nEntry = nEntry; printf("#%05i: %s -> ", nEntry, chipid); fflush(stdout); Log.section("CHIP1", false); Log.printf(" %s/n", chipid); strcpy(g_chipdata.chipId, chipid); GetTimeStamp(g_chipdata.startTime); Log.timestamp("BEGIN"); tb.SetLed(0x10); bool repeat; int bin = settings.rocType == 0 ? TestRocAna::test_roc(repeat) : TestRocDig::test_roc(repeat); tb.SetLed(0x00); tb.Flush(); GetTimeStamp(g_chipdata.endTime); Log.timestamp("END"); Log.puts("/n"); Log.flush(); printf("%3i/n", bin); return true;}
开发者ID:EJDomi,项目名称:psi46test_readout_chain,代码行数:30,
示例5: test_waferbool test_wafer(){ int x, y; g_chipdata.Invalidate(); if (!ReportWafer()) return true; if (!ReportChip(x,y)) return true; g_chipdata.nEntry = nEntry; GetTimeStamp(g_chipdata.startTime); Log.timestamp("BEGIN"); tb.SetLed(0x10); bool repeat; int bin = settings.rocType == 0 ? TestRocAna::test_roc(repeat) : TestRocDig::test_roc(repeat); tb.SetLed(0x00); tb.Flush(); GetTimeStamp(g_chipdata.endTime); Log.timestamp("END"); Log.puts("/n"); Log.flush(); printf("%3i/n", bin); printf(" RSP %s/n", prober.printf("BinMapDie %i", bin)); return true;}
开发者ID:EJDomi,项目名称:psi46test_readout_chain,代码行数:27,
示例6: test_waferbool test_wafer(){ int x, y; g_chipdata.Invalidate(); if (!ReportWafer()) return true; if (!ReportChip(x,y)) return true; g_chipdata.nEntry = nEntry; GetTimeStamp(g_chipdata.startTime); Log.timestamp("BEGIN"); tb.SetLed(0x10); bool repeat; int bin = test_roc(repeat); tb.SetLed(0x00); tb.Flush(); GetTimeStamp(g_chipdata.endTime); Log.timestamp("END"); Log.puts("/n"); Log.flush(); printf("%3i/n", bin); prober.SendCmd("BinMapDie %i", bin); return true;}
开发者ID:maiatec,项目名称:psi46test,代码行数:27,
示例7: WriteToConsolevoid cLogMgr::Write(eLogLevel verbosity, std::string entry) { if (ENABLE_LOGGING) { WriteToConsole(verbosity, GetTimeStamp() + GetVerbosityToken(verbosity) + entry); WriteToFile(verbosity, GetTimeStamp() + GetVerbosityToken(verbosity) + entry); }}
开发者ID:k39chen,项目名称:Cadabolg,代码行数:8,
示例8: GetLowerLevelvoid IPlatformFile::GetTimeStampPair(const TCHAR* PathA, const TCHAR* PathB, FDateTime& OutTimeStampA, FDateTime& OutTimeStampB){ if (GetLowerLevel()) { GetLowerLevel()->GetTimeStampPair(PathA, PathB, OutTimeStampA, OutTimeStampB); } else { OutTimeStampA = GetTimeStamp(PathA); OutTimeStampB = GetTimeStamp(PathB); }}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:12,
示例9: Wait/* * Wait * ---- * wait n ticks. * * Paramters: * n: ticks number. */void Wait(int n) { int start, end; start = GetTimeStamp(); /* Loop if time laspe is lower than wait time */ while (1) { end = GetTimeStamp(); if ((end - start) > n) { break; } }}
开发者ID:yeqingyan,项目名称:tos_tos,代码行数:21,
示例10: DrawSheetStructDrawSheetStruct * DrawSheetStruct::GenCopy(void)/***********************************************/{DrawSheetStruct * newitem = new DrawSheetStruct(m_Pos);DrawSheetLabelStruct * Slabel = NULL, * label = m_Label;int ii; newitem->m_End = m_End; newitem->m_Parent = m_Parent; newitem->m_TimeStamp = GetTimeStamp(); /* initialisation des Fields */ for(ii = 0; ii < NUMBER_OF_FIELDS; ii++) { m_Field[ii].PartTextCopy(& newitem->m_Field[ii]); } if( label ) { Slabel = newitem->m_Label = label->GenCopy(); Slabel->m_Parent = newitem; label = (DrawSheetLabelStruct*)label->Pnext; } while( label ) { Slabel->Pnext = label->GenCopy(); Slabel = (DrawSheetLabelStruct*)Slabel->Pnext; Slabel->m_Parent = newitem; label = (DrawSheetLabelStruct*)label->Pnext; } return newitem;}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:34,
示例11: Update virtual void Update () { // delete inverse; if (GetTimeStamp() == bfa->GetTimeStamp()) return; timestamp = bfa->GetTimeStamp(); cout << IM(3) << "Update Direct Solver Preconditioner" << flush; try { auto have_sparse_fact = dynamic_pointer_cast<SparseFactorization> (inverse); if (have_sparse_fact && have_sparse_fact -> SupportsUpdate()) { if (have_sparse_fact->GetAMatrix() == bfa->GetMatrixPtr()) { // cout << "have the same matrix, can update factorization" << endl; have_sparse_fact->Update(); return; } } bfa->GetMatrix().SetInverseType (inversetype); shared_ptr<BitArray> freedofs = bfa->GetFESpace()->GetFreeDofs (bfa->UsesEliminateInternal()); inverse = bfa->GetMatrix().InverseMatrix(freedofs); } catch (exception & e) { throw Exception (string("caught exception in DirectPreconditioner: /n") + e.what() + "/nneeds a sparse matrix (or has memory problems)"); } }
开发者ID:ddrake,项目名称:ngsolve,代码行数:33,
示例12: va_startvoid CLogSystem::WriteToLog( const char *format, ... ){ if ( !m_bCreateLog ) return; va_list argptr; const int maxbytes=4095; char buffer[maxbytes+1]; char cTimeStamp[30]; timeStamp_t timeStamp; va_start(argptr, format); _vsnprintf(buffer, maxbytes, format, argptr); buffer[maxbytes]=NULL; va_end(argptr); GetTimeStamp( &timeStamp ); sprintf(cTimeStamp, "%4d-%02d-%02d %02d:%02d:%02d", timeStamp.year, timeStamp.month, timeStamp.day, timeStamp.hour, timeStamp.minute, timeStamp.second); fprintf(m_fpLog, "%s;%s/n", cTimeStamp, buffer);}
开发者ID:gthgame,项目名称:gth,代码行数:28,
示例13: m_directoryPathMonitor::Monitor(SimObject * simObject, std::string directoryPath) :m_simObject(simObject), m_directoryPath(directoryPath), m_timeStamp(GetTimeStamp()){ //open csv std::string fileName = m_directoryPath + "/" + simObject->GetName() + m_timeStamp + ".csv"; m_csvStream.open(fileName);}
开发者ID:ghraelo,项目名称:BraitenbergSimulator,代码行数:7,
示例14: GetTimeStamplong TimeStamp::GetDateStamp(){ double time_stamp = GetTimeStamp(); int date_stamp = (int)time_stamp; return date_stamp;}
开发者ID:dwaynecam,项目名称:TimeStamp,代码行数:7,
示例15: GetTimeStampvoid ClientTCP::measure_latency(){ time_before_ = GetTimeStamp(); timer_.expires_from_now(boost::posix_time::seconds(MAX_DELAY)); timer_.async_wait(boost::bind(&ClientTCP::handle_timeout, this, boost::asio::placeholders::error)); socket_.async_connect(endpoint_, boost::bind(&ClientTCP::handle_connect, this, boost::asio::placeholders::error));}
开发者ID:mystic123,项目名称:Computer-Networks,代码行数:7,
示例16: GetTimeStampVOID ScoreKeeper::ExpireStaleStates( IN BOOLEAN FlushAll){ std::map<ULONG, ApplicationState *>::iterator It; ULONG CurrentTimeStamp = GetTimeStamp(); for (It = ApplicationStateHash.begin(); It != ApplicationStateHash.end(); ) { // // If we're not removing all entries and this entry is not expired, don't // remove it. // if (!FlushAll) { if ((CurrentTimeStamp - (*It).second->GetLastTouchTime()) < APPLICATION_EXPIRATION_TIME_WINDOW) { It++; continue; } } // // If we get here, we're removing the entry. // ApplicationState *State = (*It).second; ApplicationStateHash.erase(It); delete State; It = ApplicationStateHash.begin(); }}
开发者ID:340211173,项目名称:hf-2011,代码行数:35,
示例17: sprintfj_boolean_t CAccessOprator::HasDownLoaded(const j_char_t *pFileName){ try { char strCmd[512] = {0}; sprintf(strCmd, "SELECT * FROM FileInfo WHERE FileName = '%s';", pFileName); m_pRec = m_pConn->Execute((_bstr_t)strCmd, NULL, adCmdText); if (!m_pRec->EndOfFile) { return true; } j_string_t strTimeStamp = GetTimeStamp(pFileName); memset (strCmd, 0, sizeof(strCmd)); sprintf(strCmd, "SELECT * FROM FileInfo WHERE [TimeStamp] <= (SELECT MIN([TimeStamp]) FROM FileInfo);"); m_pRec = m_pConn->Execute((_bstr_t)strCmd, NULL, adCmdText); if (!m_pRec->EndOfFile && strTimeStamp < (char*)_bstr_t(m_pRec->GetCollect("TimeStamp"))) { return true; } } catch (...){} return false;}
开发者ID:dalinhuang,项目名称:jorhy-xl,代码行数:25,
示例18: GetID//DebugvoidPacket::Print (){ std::cout << " ********** /n **Packet:" "/n ** ID " << GetID () << " timeStamp " << GetTimeStamp () << "/n ** size: " << GetSize() << "/n ** sourcePort " << GetSourcePort() << " destinationPort " << GetDestinationPort() << "/n ** srcIP " << GetSourceID() << " dstIP " << GetDestinationID() << "/n ** srcMAC " << GetSourceMAC() << " dstMAC " << GetDestinationMAC() << std::endl; if (m_RLCHeader->IsAFragment()) std::cout << " ** IsAFragment TRUE "; else std::cout << " ** IsAFragment FALSE "; if (m_RLCHeader->IsTheLatestFragment()) std::cout << " IsTheLatestFragment TRUE "; else std::cout << " IsTheLatestFragment FALSE "; std::cout << "/n **********" << std::endl;}
开发者ID:Linyes,项目名称:lte_sim,代码行数:28,
示例19: GetTimeStampLRESULT CAgentCfg::WriteDevicesFile(std::string xmlFile, std::string destFolder){ std::string contents; contents+="<?xml version=/"1.0/" encoding=/"UTF-8/"?>/n"; contents+="<MTConnectDevices xmlns=/"urn:mtconnect.org:MTConnectDevices:1.1/" xmlns:xsi=/"http://www.w3.org/2001/XMLSchema-instance/" xsi:schemaLocation=/"urn:mtconnect.org:MTConnectDevices:1.1 http://www.mtconnect.org/schemas/MTConnectDevices_1.1.xsd/">/n"; contents+=StdStringFormat("<Header bufferSize=/"130000/" instanceId=/"1/" creationTime=/"%s/" sender=/"local/" version=/"1.1/"/>/n", GetTimeStamp().c_str()); contents+="<Devices>/n"; // Check all machine names unique // Generate Devices.xml file with all devices in it. for(UINT i=0; i<devices.size(); i++) { std::string config = ReadXmlDevicesFile(devices[i]); ReplaceAll(config,"####", names[i]); config=ReplaceOnce(config,"name=/"NNNNNN/"","name=/""+names[i]+"/""); contents+=config+"/n"; } contents+="</Devices>/n"; contents+="</MTConnectDevices>/n"; if(!xmlFile.empty()) WriteFile(destFolder + "//" + xmlFile , contents); return 0;}
开发者ID:amanrenishaw,项目名称:MTConnectGadgets,代码行数:26,
示例20: updatefromservervoid updatefromserver(char server_reply[255],struct device *s_device){ int linecount = 0,countdelimiter=0; char **res,buff[255]; char reply[100]; int servertime; //printf("enterrd func"); strcpy(reply,server_reply); servertime = GetTimeStamp(reply); //printf("Time : %d/n",servertime); if (strstr(server_reply,"Switch")!=NULL) { split( server_reply, ':', &res, &countdelimiter ); if((strstr(res[2],"On"))!=NULL) { s_device->onstatus = true; //printf("Turned on from server/n"); } else if ((strstr(res[2],"Off"))!=NULL) { s_device->onstatus = false; //printf("Turned off from server/n"); } else printf("Corrupted message from server/n"); } else printf("Corrupted message from server Message Type Unknown/n"); //Logical Clock if(servertime > ((long int) time(NULL)+timediff)) timediff = timediff + (servertime - ((long int) time(NULL)));// printf("End of func/n");}
开发者ID:arjunv91,项目名称:iot,代码行数:30,
示例21: fsGetDataFilePathvoid vmsLogger::WriteLog(const tstring& message){ tstring logFile = fsGetDataFilePath("fdmlog.txt"); std::fstream file(logFile, std::ios_base::app); file << GetTimeStamp() << _T(" ") << message << std::endl;}
开发者ID:HackLinux,项目名称:Free-Download-Manager-vs2010,代码行数:7,
示例22: get_master_clockdouble get_master_clock(void){ double tstamp; GetTimeStamp(hBuff, &tstamp); return tstamp - audio_delta;};
开发者ID:ChokshiUtsav,项目名称:kolibriosSVN,代码行数:7,
示例23: xnDumpWriteBuffervoid XnFrameStreamProcessor::OnEndOfFrame(const XnSensorProtocolResponseHeader* pHeader){ // write dump XnBuffer* pCurWriteBuffer = m_pTripleBuffer->GetWriteBuffer(); xnDumpWriteBuffer(m_InternalDump, pCurWriteBuffer->GetData(), pCurWriteBuffer->GetSize()); xnDumpClose(&m_InternalDump); xnDumpClose(&m_InDump); if (!m_bFrameCorrupted) { // mark the buffer as stable XnUInt64 nTimestamp = GetTimeStamp(pHeader->nTimeStamp); XnUInt32 nFrameID; m_pTripleBuffer->MarkWriteBufferAsStable(nTimestamp, &nFrameID); // let inheriting classes do their stuff OnFrameReady(nFrameID, nTimestamp); } else { // restart m_pTripleBuffer->GetWriteBuffer()->Reset(); } // log bandwidth XnUInt64 nSysTime; xnOSGetTimeStamp(&nSysTime); xnDumpWriteString(m_pDevicePrivateData->BandwidthDump, "%llu,%s,%d,%d/n", nSysTime, m_csName, GetCurrentFrameID(), m_nBytesReceived); // re-init dumps xnDumpInit(&m_InDump, m_csInDumpMask, NULL, "%s_%d.raw", m_csInDumpMask, GetCurrentFrameID()); xnDumpInit(&m_InternalDump, m_csInternalDumpMask, NULL, "%s_%d.raw", m_csInternalDumpMask, GetCurrentFrameID()); m_nBytesReceived = 0;}
开发者ID:linjason,项目名称:Scene-Matching,代码行数:35,
示例24: GetTimeStampdouble Timer::GetTimeStampClear(unsigned int id){ double t = GetTimeStamp(id); m_timeStamps.erase(id); return t;}
开发者ID:ACPLMaverick,项目名称:MAVNET,代码行数:7,
示例25: StartAnimationvoid StartAnimation(){ DirectFBStage *stage = sgDirectFBFrame->GetStage(); while (!sgDead) { int waitMs = (stage->GetNextWake() - GetTimeStamp()) * 1000; if (waitMs < 0) { waitMs = 0; } sgEventBuffer->WaitForEventWithTimeout(sgEventBuffer, 0, waitMs); while (sgEventBuffer->HasEvent(sgEventBuffer) != DFB_BUFFEREMPTY) { DFBEvent event; sgEventBuffer->GetEvent(sgEventBuffer, DFB_EVENT(&event)); stage->ProcessEvent(event); if (sgDead) { break; } } Event poll(etPoll); stage->HandleEvent(poll); } Event deactivate(etDeactivate); stage->HandleEvent(deactivate); Event kill(etDestroyHandler); stage->HandleEvent(kill);}
开发者ID:Gemioli,项目名称:lime,代码行数:30,
示例26: getMixerTimeint getMixerTime(int inTime0){ double now = GetTimeStamp(); if (now>sLastMusicUpdate+1) return sSoundPos; return (sSoundPos-inTime0) + (int)( (now - sLastMusicUpdate)*sMusicFrequency );}
开发者ID:clemos,项目名称:nme,代码行数:8,
示例27: GetTimeStamp //WriteLog function writes formatted log to File or Console void Logger::WriteLog(loglevel level, string message, bool file) { try{ _msemaphore.lock(); if (file) { _fhnd << GetTimeStamp() << " " << GetLoglevelString(level) << message << endl; } else { cout << GetTimeStamp() << " " << GetLoglevelString(level) << message << endl; } _msemaphore.unlock(); } catch (std::exception& e){ throw e; } }
开发者ID:giridharkl,项目名称:cpp-logger,代码行数:18,
注:本文中的GetTimeStamp函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetTimeZoneInformation函数代码示例 C++ GetTimeMs函数代码示例 |