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


C++ Statistic::GetTotalTime方法代码示例

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


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

示例1: ext_ph

logical ClientObject :: Start ( )
{
  int32                    lindx0 = 0;
  int32                   *loid_array;
  int32                    count;
  int32                    err_count = 0;
  Statistic               stats;
  ODABAClient             client;
  DBObjectHandle          obhandle(utility_handle->sdbures->dbhandle);
  logical                 term = NO;
BEGINSEQ
  if ( !this )                                       ERROR
  (*client_count)++;

  stats.Start();
  
  if ( !obhandle.IsServer() )  // client/server application
  {
    ds_handle = new DataSourceHandle();
    ds_handle->SetDataSource(utility_handle->sdbures);
    client.Open(NULL,"TestCS");
    if ( ds_handle->Open(client) )                   ERROR
    obhandle = ds_handle->dbhandle;
  }

  PropertyHandle  ext_ph(obhandle,extent,PI_Read);  SDBCERR
  PropertyHandle  void_ph(obhandle,"VOID",PI_Read); SDBCERR

  printf("\nThread %i started (%s)",id,extent);

  if ( (count = ext_ph.GetCount()) > 0 )
  {
    loid_array = new int32[count];
    memset(loid_array,0,count*sizeof(int32));
    
    while ( ext_ph.Get(lindx0) )
      loid_array[lindx0++] = ext_ph.GetLOID();
    
    lindx0 = 0;
    while ( lindx0 < count ) 
      if ( !void_ph.Get(loid_array[lindx0++]) )
        err_count++;
      
    delete loid_array;
  }
  stats.Stop();


  printf("\nThread %i stopped (%s) normally. Errors: %i",id,extent,err_count);
  printf("\n          total time: %s",stats.GetTotalTime());

RECOVER
  printf("\nThread %i terminated (%s) with error",id,extent);
  term = YES;
ENDSEQ
  if ( this ) 
  {  
    obhandle.Close();
    Close();
    client.ShutDown();
    (*client_count)--;
    delete this;
  }
  return(term);
}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:65,代码来源:ClientObject.cpp


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