當前位置: 首頁>>代碼示例>>C++>>正文


C++ Interval::getEndTime方法代碼示例

本文整理匯總了C++中Interval::getEndTime方法的典型用法代碼示例。如果您正苦於以下問題:C++ Interval::getEndTime方法的具體用法?C++ Interval::getEndTime怎麽用?C++ Interval::getEndTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Interval的用法示例。


在下文中一共展示了Interval::getEndTime方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: IntervalThread

KRecordList *IntervalCPU::calcNext( KRecordList *displayList, bool initCalc )
{
  SemanticHighInfo highInfo;

  if( displayList == NULL )
    displayList = &myDisplayList;

  if( !initCalc )
  {
    *begin = *end;
  }

  if( intervalCompose.empty() )
    return displayList;

  if( intervalCompose[ begin->getThread() - firstThreadOnCPU ] == NULL )
  {
    int i = begin->getThread() - firstThreadOnCPU;
    intervalThread[ i ] = new IntervalThread( window, THREAD, begin->getThread() );
    intervalThread[ i ]->setNotWindowInits( true );
    intervalThread[ i ]->setSemanticFunction( functionThread );

    intervalCompose[ i ] = new IntervalCompose( window, COMPOSETHREAD, begin->getThread() );
    intervalCompose[ i ]->setNotWindowInits( true );
    intervalCompose[ i ]->setCustomChild( intervalThread[ i ] );
    intervalCompose[ i ]->setSemanticFunction( functionComposeThread );

    intervalCompose[ i ]->init( currentInitialTime, NOCREATE, NULL );
  }

  Interval *currentThread = intervalCompose[ begin->getThread() - firstThreadOnCPU ];
  highInfo.callingInterval = this;
  if( begin->getType() == STATE + END )
    highInfo.values.push_back( 0.0 );
  else
  {
    while( currentThread->getEndTime() <= begin->getTime() &&
           currentThread->getBeginTime() < window->getTrace()->getEndTime() )
      currentThread->calcNext( NULL );
    if( currentThread->getBegin()->getCPU() != order )
      highInfo.values.push_back( 0.0 );
    else
      highInfo.values.push_back( currentThread->getValue() );
  }
  currentValue = function->execute( &highInfo );
  end = getNextRecord( end, displayList );

  return displayList;
}
開發者ID:mogeb,項目名稱:extrae-paraver,代碼行數:49,代碼來源:intervalcpu.cpp

示例2: getPrevRecord

KRecordList *IntervalCPU::calcPrev( KRecordList *displayList, bool initCalc )
{
  SemanticHighInfo highInfo;

  if( displayList == NULL )
    displayList = &myDisplayList;

  if( !initCalc )
  {
    *end = *begin;
  }

  if( intervalCompose.empty() )
    return displayList;

  begin = getPrevRecord( begin, displayList );
  highInfo.callingInterval = this;

  if( intervalCompose[ begin->getThread() - firstThreadOnCPU ] == NULL )
  {
    int i = begin->getThread() - firstThreadOnCPU;
    intervalThread[ i ] = new IntervalThread( window, THREAD, begin->getThread() );
    intervalThread[ i ]->setNotWindowInits( true );
    intervalThread[ i ]->setSemanticFunction( functionThread );

    intervalCompose[ i ] = new IntervalCompose( window, COMPOSETHREAD, begin->getThread() );
    intervalCompose[ i ]->setNotWindowInits( true );
    intervalCompose[ i ]->setCustomChild( intervalThread[ i ] );
    intervalCompose[ i ]->setSemanticFunction( functionComposeThread );

    intervalCompose[ i ]->init( currentInitialTime, NOCREATE, NULL );
  }

  Interval *currentThread = intervalCompose[ begin->getThread() - firstThreadOnCPU ];
  while( currentThread->getBeginTime() >= begin->getTime() &&
         currentThread->getEndTime() > 0.0 )
    currentThread->calcPrev( NULL );
  highInfo.values.push_back( currentThread->getValue() );
  currentValue = function->execute( &highInfo );

  if( initCalc )
  {
    *end = *begin;
  }

  return displayList;
}
開發者ID:mogeb,項目名稱:extrae-paraver,代碼行數:47,代碼來源:intervalcpu.cpp


注:本文中的Interval::getEndTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。