stat_control.cc (7823:dac01f14f20f) | stat_control.cc (7840:ed75cee5c793) |
---|---|
1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 51 unchanged lines hidden (view full) --- 60 61Time statTime(true); 62Tick startTick; 63 64struct SimTicksReset : public Callback 65{ 66 void process() 67 { | 1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 51 unchanged lines hidden (view full) --- 60 61Time statTime(true); 62Tick startTick; 63 64struct SimTicksReset : public Callback 65{ 66 void process() 67 { |
68 statTime.set(); | 68 statTime.setTimer(); |
69 startTick = curTick(); 70 } 71}; 72 73double 74statElapsedTime() 75{ | 69 startTick = curTick(); 70 } 71}; 72 73double 74statElapsedTime() 75{ |
76 Time now(true); | 76 Time now; 77 now.setTimer(); 78 |
77 Time elapsed = now - statTime; | 79 Time elapsed = now - statTime; |
78 return elapsed(); | 80 return elapsed; |
79} 80 81Tick 82statElapsedTicks() 83{ 84 return curTick() - startTick; 85} 86 --- 118 unchanged lines hidden --- | 81} 82 83Tick 84statElapsedTicks() 85{ 86 return curTick() - startTick; 87} 88 --- 118 unchanged lines hidden --- |