Changes in / [9e6955d:91d6584]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Stats/Time.cc

    r9e6955d r91d6584  
    3636                        point_t global_begin;
    3737
    38                         size_t prevl = 0;
    39                         size_t currl = 0;
     38                        int prevl = 0;
     39                        int currl = 0;
    4040
    4141                        template<typename T>
     
    8888                                virtual void print(std::ostream & os) override {
    8989                                        if(currl > prevl) {
    90                                                 // std::cerr << "push last " << last << std::endl;
    9190                                                parents.push(last);
    92                                         } else if(currl < prevl) {
     91                                        }
     92                                        for(auto lvl = prevl - currl; lvl > 0; lvl--) {
    9393                                                parents.pop();
    94                                                 // std::cerr << "pop, top = " << parents.top() << std::endl;
    9594                                        }
    96                                         // else {
    97                                                 last = end - begin;
    98                                                 // std::cerr << "last = " << last << "\t";
    99                                         // }
     95                                        last = end - begin;
    10096
    10197                                        assert(finished);
     
    136132                        std::stack<TimerNode *> nodes;
    137133
    138                         std::chrono::duration<double> TimerNode::last = {};
    139                         std::stack<std::chrono::duration<double>> TimerNode::parents = {};
     134                        std::chrono::duration<double> TimerNode::last;
     135                        std::stack<std::chrono::duration<double>> TimerNode::parents;
    140136
    141137                        void StartGlobal() {
Note: See TracChangeset for help on using the changeset viewer.