Ignore:
Timestamp:
06/06/17 17:09:31 (7 years ago)
Author:
yushan
Message:

branch re-merged with trunk @1156

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/src/timer.cpp

    r1156 r1157  
    66#include <sstream> 
    77#include "tracer.hpp" 
     8#include <iostream> 
     9#include <sstream> 
    810 
    911namespace xios 
     
    6163    // return it->second; 
    6264 
    63     if(allTimer_ptr == NULL) allTimer_ptr = new std::map<std::string,CTimer>; 
     65    if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 
    6466 
    6567    std::map<std::string,CTimer>::iterator it = (*allTimer_ptr).find(name); 
     
    7173  string CTimer::getAllCumulatedTime(void) 
    7274  { 
     75    if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 
     76 
    7377    std::ostringstream strOut ; 
    74     for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it) 
     78    for(std::map<std::string,CTimer>::iterator it=(*allTimer_ptr).begin();it!=(*allTimer_ptr).end();++it) 
    7579      strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ; 
    7680    return strOut.str() ; 
    7781  } 
     82 
    7883} 
Note: See TracChangeset for help on using the changeset viewer.