这篇教程C++ startTime函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中startTime函数的典型用法代码示例。如果您正苦于以下问题:C++ startTime函数的具体用法?C++ startTime怎么用?C++ startTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了startTime函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: QgsMeshCalculatorstd::unique_ptr<QgsMeshCalculator> QgsMeshCalculatorDialog::calculator() const{ std::unique_ptr<QgsMeshCalculator> calc; if ( useExtentCb->isChecked() ) { calc.reset( new QgsMeshCalculator( formulaString(), outputFile(), outputExtent(), startTime(), endTime(), meshLayer() ) ); } else { calc.reset( new QgsMeshCalculator( formulaString(), outputFile(), maskGeometry(), startTime(), endTime(), meshLayer() ) ); } return calc;}
开发者ID:dwsilk,项目名称:QGIS,代码行数:31,
示例2: completionTimeGanttChart* Chromosome::ganttChart(){ if(m_chart == nullptr) { int cMax = completionTime(); m_chart = new GanttChart(cMax); QList<GanttMachine*> machines; GanttMachine* m; int machinesCount = Jobshop::instance()->machinesCount(); for(int i=0; i<machinesCount; ++i) { m = new GanttMachine(QString("m%1").arg(i+1), m_chart); machines.append(m); m->setPos(0, i * GanttChart::machineHeight); m->setCMax(cMax); } for(const QString& opId : m_genes) { const Operation& op = Jobshop::instance()->operation(opId); GanttOperation* gop = op.ganttGraphic(); gop->setParentItem(machines[op.machine()]); QPointF pos = GanttChart::operationPosition(startTime(opId)); gop->setPos(pos + GanttChart::machineOffset()); } } return m_chart;}
开发者ID:konserw,项目名称:jobshop,代码行数:30,
示例3: startTimevoid BoardDispatch::recvLeaveScoreMode(void){ if(!boardwindow) return; startTime(); //protocol specific or not? boardwindow->qgoboard->leaveScoreMode();}
开发者ID:alserkli,项目名称:qgo,代码行数:7,
示例4: catch void ContinuousServiceUpdateAction::_setFromParametersMap(const ParametersMap& map) { try { _service = ContinuousServiceTableSync::GetEditable(map.get<RegistryKeyType>(PARAMETER_SERVICE_ID), *_env); } catch(ObjectNotFoundException<ContinuousService>&) { throw ActionException("No such service"); } _duration = minutes(map.get<int>(PARAMETER_WAITING_DURATION)); time_duration endTime(not_a_date_time); if(!map.getDefault<string>(PARAMETER_END_TIME).empty()) { try { endTime = duration_from_string(map.get<string>(PARAMETER_END_TIME)); } catch(bad_lexical_cast) { throw ActionException("Bad end time"); } } time_duration startTime(_service->getDepartureSchedule(false, 0)); _range = endTime - startTime; }
开发者ID:Tisseo,项目名称:synthese,代码行数:31,
示例5: isEqualbool VTTCue::isEqual(const VTTCue& cue, CueMatchRules match) const{ if (cueType() != cue.cueType()) return false; if (match != IgnoreDuration && endTime() != cue.endTime()) return false; if (startTime() != cue.startTime()) return false; if (text() != cue.text()) return false; if (cueSettings() != cue.cueSettings()) return false; if (id() != cue.id()) return false; if (position() != cue.position()) return false; if (line() != cue.line()) return false; if (size() != cue.size()) return false; if (align() != cue.align()) return false; return true;}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:26,
示例6: countvoid QmlProfilerRangeModel::computeNestingContracted(){ int i; int eventCount = count(); int nestingLevels = QmlDebug::Constants::QML_MIN_LEVEL; int collapsedRowCount = nestingLevels + 1; QVector<qint64> nestingEndTimes; nestingEndTimes.fill(0, nestingLevels + 1); for (i = 0; i < eventCount; i++) { qint64 st = startTime(i); // per type if (nestingEndTimes[nestingLevels] > st) { if (++nestingLevels == nestingEndTimes.size()) nestingEndTimes << 0; if (nestingLevels == collapsedRowCount) ++collapsedRowCount; } else { while (nestingLevels > QmlDebug::Constants::QML_MIN_LEVEL && nestingEndTimes[nestingLevels-1] <= st) nestingLevels--; } nestingEndTimes[nestingLevels] = st + duration(i); m_data[i].displayRowCollapsed = nestingLevels; } setCollapsedRowCount(collapsedRowCount);}
开发者ID:AgnosticPope,项目名称:qt-creator,代码行数:30,
示例7: whilevoid QmlProfilerRangeModel::findBindingLoops(){ typedef QPair<int, int> CallStackEntry; QStack<CallStackEntry> callStack; for (int i = 0; i < count(); ++i) { int potentialParent = callStack.isEmpty() ? -1 : callStack.top().second; while (potentialParent != -1 && !(endTime(potentialParent) > startTime(i))) { callStack.pop(); potentialParent = callStack.isEmpty() ? -1 : callStack.top().second; } // check whether event is already in stack for (int ii = 0; ii < callStack.size(); ++ii) { if (callStack.at(ii).first == typeId(i)) { m_data[i].bindingLoopHead = callStack.at(ii).second; break; } } CallStackEntry newEntry(typeId(i), i); callStack.push(newEntry); }}
开发者ID:AgnosticPope,项目名称:qt-creator,代码行数:26,
示例8: test_fmastatic void test_fma() { for(int i=0; i<1020 * 4; i++) { data_f[i] = i; } float32x4_t c0_02 = vdupq_n_f32(0.02f); float32x4_t c0_04 = vdupq_n_f32(0.04f); float32x4_t c0_05 = vdupq_n_f32(0.05f); float32x4_t c0_10 = vdupq_n_f32(0.1f); float32x4_t c0_20 = vdupq_n_f32(0.2f); float32x4_t c1_00 = vdupq_n_f32(1.0f); startTime(); // Do ~1 billion ops for (int ct=0; ct < (1000 * (1000 / 80)); ct++) { for (int i=0; i < 1000; i++) { float32x4_t t; t = vmulq_f32(vld1q_f32((float32_t *)&data_f[i]), c0_02); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+4]), c0_04); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+8]), c0_05); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+12]), c0_10); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+16]), c0_20); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+20]), c0_20); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+24]), c0_10); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+28]), c0_05); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+32]), c0_04); t = vmlaq_f32(t, vld1q_f32((float32_t *)&data_f[i+36]), c0_02); t = vaddq_f32(t, c1_00); vst1q_f32((float32_t *)&data_f[i], t); } } endTime("neon fma", 1e9);}
开发者ID:Khaon,项目名称:android_system_extras,代码行数:34,
示例9: ifvoid MemoryUsageModel::loadEvent(const QmlEvent &event, const QmlEventType &type){ if (type.message() != MemoryAllocation) { if (type.rangeType() != MaximumRangeType) { if (event.rangeStage() == RangeStart) m_rangeStack.push(RangeStackFrame(event.typeIndex(), event.timestamp())); else if (event.rangeStage() == RangeEnd) m_rangeStack.pop(); m_continuation = ContinueNothing; } return; } auto canContinue = [&](EventContinuation continuation) { QTC_ASSERT(continuation != ContinueNothing, return false); if ((m_continuation & continuation) == 0) return false; int currentIndex = (continuation == ContinueAllocation ? m_currentJSHeapIndex : m_currentUsageIndex); if (m_rangeStack.isEmpty()) { qint64 amount = event.number<qint64>(0); // outside of ranges show monotonous allocation or deallocation return (amount >= 0 && m_data[currentIndex].allocated >= 0) || (amount < 0 && m_data[currentIndex].deallocated > 0); } else { return m_data[currentIndex].typeId == m_rangeStack.top().originTypeIndex && m_rangeStack.top().startTime < startTime(currentIndex); } };
开发者ID:NamiStudio,项目名称:qt-creator,代码行数:32,
示例10: mainint main(void){ zmq::context_t context(1); zmq::socket_t socket(context,ZMQ_PUB); socket.bind("tcp://*:6002"); int file; char *filename = "/dev/i2c-1"; if ((file=open(filename,O_RDWR)) < 0){ std::cout << "Failed to open the bus" << std::endl; return 1; } if (ioctl(file,I2C_SLAVE,0x29) < 0) { std::cout << "Failed to talk to slave" << std::endl; return 1; } pressure pboard(file); startTime(); while(true) { std::ostringstream pss; pss << "2/t" << pboard.getPressure() << getElapsed() << std::endl; s_send(socket,pss.str()) }}
开发者ID:jvsd,项目名称:mpu9150,代码行数:32,
示例11: qWarningvoid QmlProfilerRangeModel::finalize(){ if (!m_stack.isEmpty()) { qWarning() << "End times for some events are missing."; const qint64 endTime = modelManager()->traceEnd(); do { int index = m_stack.pop(); insertEnd(index, endTime - startTime(index)); } while (!m_stack.isEmpty()); } // compute range nesting computeNesting(); // compute nestingLevel - nonexpanded computeNestingContracted(); // compute nestingLevel - expanded computeExpandedLevels(); if (supportsBindingLoops()) findBindingLoops(); QmlProfilerTimelineModel::finalize();}
开发者ID:choenig,项目名称:qt-creator,代码行数:25,
示例12: startTimeint PixmapCacheModel::updateCacheCount(int lastCacheSizeEvent, qint64 pixmapStartTime, qint64 pixSize, PixmapCacheItem &newEvent, int typeId){ newEvent.pixmapEventType = PixmapCacheCountChanged; newEvent.rowNumberCollapsed = 1; newEvent.typeId = typeId; int index = lastCacheSizeEvent; if (lastCacheSizeEvent != -1) { newEvent.cacheSize = m_data[lastCacheSizeEvent].cacheSize + pixSize; qint64 duration = pixmapStartTime - startTime(lastCacheSizeEvent); if (duration > 0) { insertEnd(lastCacheSizeEvent, duration); index = insertStart(pixmapStartTime, 0); m_data.insert(index, newEvent); } else { // If the timestamps are the same, just replace it m_data[index] = newEvent; } } else { newEvent.cacheSize = pixSize; index = insertStart(pixmapStartTime, 0); m_data.insert(index, newEvent); } return index;}
开发者ID:daodaoliang,项目名称:qt-creator,代码行数:27,
示例13: whilevoid PixmapCacheModel::flattenLoads(){ int collapsedRowCount = 0; // computes "compressed row" QVector <qint64> eventEndTimes; for (int i = 0; i < count(); i++) { PixmapCacheModel::PixmapCacheItem &event = m_data[i]; if (event.pixmapEventType == PixmapCacheModel::PixmapLoadingStarted) { event.rowNumberCollapsed = 0; while (eventEndTimes.count() > event.rowNumberCollapsed && eventEndTimes[event.rowNumberCollapsed] > startTime(i)) event.rowNumberCollapsed++; if (eventEndTimes.count() == event.rowNumberCollapsed) eventEndTimes << 0; // increase stack length, proper value added below eventEndTimes[event.rowNumberCollapsed] = endTime(i); // readjust to account for category empty row and bargraph event.rowNumberCollapsed += 2; } if (event.rowNumberCollapsed > collapsedRowCount) collapsedRowCount = event.rowNumberCollapsed; } // Starting from 0, count is maxIndex+1 setCollapsedRowCount(collapsedRowCount + 1); setExpandedRowCount(m_pixmaps.count() + 2);}
开发者ID:daodaoliang,项目名称:qt-creator,代码行数:29,
示例14: test_madstatic void test_mad() { for(int i=0; i<1020; i++) { data_f[i] = i; } startTime(); // Do ~1 billion ops for (int ct=0; ct < (1000 * (1000 / 20)); ct++) { for (int i=0; i < 1000; i++) { data_f[i] = (data_f[i] * 0.02f + data_f[i+1] * 0.04f + data_f[i+2] * 0.05f + data_f[i+3] * 0.1f + data_f[i+4] * 0.2f + data_f[i+5] * 0.2f + data_f[i+6] * 0.1f + data_f[i+7] * 0.05f + data_f[i+8] * 0.04f + data_f[i+9] * 0.02f + 1.f); } } endTime("scalar mad", 1e9);}
开发者ID:Khaon,项目名称:android_system_extras,代码行数:25,
示例15: QMainWindowSudoku::Sudoku(int nivel, bool cargar, QWidget *parent) : QMainWindow(parent), ui(new Ui::Sudoku){ ui->setupUi(this); setWindowTitle("Sudoku"); setWindowIcon(QIcon(":/recursos/Imagenes/logo.JPG")); setFixedSize(width(),height()); if(!cargar){ bool ok; nombre=QInputDialog::getText(this,"Juego Nuevo","Ingrese el nombre del jugador:",QLineEdit::Normal,"",&ok); } Tablero* t = new Tablero(); inicializarMatriz(); iniciarTeclado(); t->generarTablero(); pasarTableroAMatriz(t->casillas); inicializarTablasUI(t->casillas); ocultarCasillas(nivel,t); if(cargar){ cargarPartida(); } pasarMatrizAUI(); inicializarCronometro(); startTime();}
开发者ID:josephtk18,项目名称:ProyectoSudoku,代码行数:31,
示例16: W_UNUSED void ScaleAffector::animate(long long dt, long long age) { W_UNUSED(dt); float d = delta(age, startTime(), endTime()); Vector ds = priv->end - priv->start; Vector scale = priv->start + (ds*d); sprite->scale(scale); }
开发者ID:winglot,项目名称:WEngine,代码行数:8,
示例17: returnbool OEffectiveEvent::operator<( const OEffectiveEvent &e ) const{ if ( data->date < e.date() ) return TRUE; if ( data->date == e.date() ) return ( startTime() < e.startTime() ); else return FALSE;}
开发者ID:opieproject,项目名称:opie,代码行数:8,
示例18: endTime// ---------------------------------------------------------------------------// duration// ---------------------------------------------------------------------------//! Return time, in seconds, spanned by this Partial, or 0. if there//! are no Breakpoints.//doublePartial::duration( void ) const{ if ( numBreakpoints() == 0 ) { return 0.; } return endTime() - startTime();}
开发者ID:gesellkammer,项目名称:loris14-extended,代码行数:15,
示例19: setMaxTimeMicros void CurOp::setMaxTimeMicros(uint64_t maxTimeMicros) { if (maxTimeMicros == 0) { // 0 is "allow to run indefinitely". return; } // Note that calling startTime() will set CurOp::_start if it hasn't been set yet. _maxTimeTracker.setTimeLimit(startTime(), maxTimeMicros); }
开发者ID:Axv2,项目名称:mongo,代码行数:9,
示例20: modelManagerQVariantMap DebugMessagesModel::details(int index) const{ const QmlEventType &type = modelManager()->qmlModel()->eventTypes()[m_data[index].typeId]; QVariantMap result; result.insert(QLatin1String("displayName"), messageType(type.detailType())); result.insert(tr("Timestamp"), QmlProfilerDataModel::formatTime(startTime(index))); result.insert(tr("Message"), m_data[index].text); result.insert(tr("Location"), type.displayName()); return result;}
开发者ID:NamiStudio,项目名称:qt-creator,代码行数:11,
示例21: SetMicroTimer bool SetMicroTimer(uint64_t micro) { LogAssert(m_scheduler->IsMainThread()); TimeSpec startTime(TimeSpec::MonoNow()); if (startTime.empty()) return false; return setExpireTime(startTime, micro); }
开发者ID:Lennie,项目名称:OpenBFDD,代码行数:11,
示例22: insertEndvoid PixmapCacheModel::finalize(){ if (m_lastCacheSizeEvent != -1) { insertEnd(m_lastCacheSizeEvent, modelManager()->traceTime()->endTime() - startTime(m_lastCacheSizeEvent)); } resizeUnfinishedLoads(); computeMaxCacheSize(); flattenLoads(); computeNesting();}
开发者ID:daodaoliang,项目名称:qt-creator,代码行数:12,
示例23: startTimebool CCActiveAnimation::isFinishedAt(double monotonicTime) const{ if (m_runState == Finished || m_runState == Aborted) return true; if (m_needsSynchronizedStartTime) return false; return m_runState == Running && m_iterations >= 0 && m_iterations * m_curve->duration() <= monotonicTime - startTime() - m_totalPausedTime;}
开发者ID:Moondee,项目名称:Artemis,代码行数:12,
示例24: qt_static_metacallint EventEditor::qt_metacall(QMetaObject::Call _c, int _id, void **_a){ _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 11) qt_static_metacall(this, _c, _id, _a); _id -= 11; }#ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = subject(); break; case 1: *reinterpret_cast< QString*>(_v) = location(); break; case 2: *reinterpret_cast< QDateTime*>(_v) = startTime(); break; case 3: *reinterpret_cast< QDateTime*>(_v) = endTime(); break; case 4: *reinterpret_cast< int*>(_v) = folderId(); break; case 5: *reinterpret_cast< int*>(_v) = accountId(); break; case 6: *reinterpret_cast< Mode*>(_v) = mode(); break; } _id -= 7; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setSubject(*reinterpret_cast< QString*>(_v)); break; case 1: setLocation(*reinterpret_cast< QString*>(_v)); break; case 2: setStartTime(*reinterpret_cast< QDateTime*>(_v)); break; case 3: setEndTime(*reinterpret_cast< QDateTime*>(_v)); break; case 4: setFolderId(*reinterpret_cast< int*>(_v)); break; case 5: setAccountId(*reinterpret_cast< int*>(_v)); break; case 6: setMode(*reinterpret_cast< Mode*>(_v)); break; } _id -= 7; } else if (_c == QMetaObject::ResetProperty) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; }#endif // QT_NO_PROPERTIES return _id;}
开发者ID:tbeemster,项目名称:bb10-quickcalendar,代码行数:51,
示例25: setMaxTimeMicros void CurOp::setMaxTimeMicros(uint64_t maxTimeMicros) { _maxTimeMicros = maxTimeMicros; if (_maxTimeMicros == 0) { // 0 is "allow to run indefinitely". return; } // If the operation has a start time, then enable the tracker. // // If the operation has no start time yet, then ensureStarted() will take responsibility for // enabling the tracker. if (isStarted()) { _maxTimeTracker.setTimeLimit(startTime(), _maxTimeMicros); } }
开发者ID:Benguang,项目名称:mongo,代码行数:16,
注:本文中的startTime函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ startTimer函数代码示例 C++ startThread函数代码示例 |