Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1166)

Side by Side Diff: runtime/vm/timer.h

Issue 2850783002: Dart SDK Spelling b, c, and d. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | samples-dev/swarm/SwarmApp.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_TIMER_H_ 5 #ifndef RUNTIME_VM_TIMER_H_
6 #define RUNTIME_VM_TIMER_H_ 6 #define RUNTIME_VM_TIMER_H_
7 7
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 21 matching lines...) Expand all
32 ASSERT(start_ != 0); 32 ASSERT(start_ != 0);
33 ASSERT(running()); 33 ASSERT(running());
34 stop_ = OS::GetCurrentMonotonicMicros(); 34 stop_ = OS::GetCurrentMonotonicMicros();
35 int64_t elapsed = ElapsedMicros(); 35 int64_t elapsed = ElapsedMicros();
36 max_contiguous_ = Utils::Maximum(max_contiguous_, elapsed); 36 max_contiguous_ = Utils::Maximum(max_contiguous_, elapsed);
37 // Make increment atomic in case it occurs in parallel with aggregation. 37 // Make increment atomic in case it occurs in parallel with aggregation.
38 AtomicOperations::IncrementInt64By(&total_, elapsed); 38 AtomicOperations::IncrementInt64By(&total_, elapsed);
39 running_ = false; 39 running_ = false;
40 } 40 }
41 41
42 // Get total cummulative elapsed time in micros. 42 // Get total cumulative elapsed time in micros.
43 int64_t TotalElapsedTime() const { 43 int64_t TotalElapsedTime() const {
44 int64_t result = total_; 44 int64_t result = total_;
45 if (running_) { 45 if (running_) {
46 int64_t now = OS::GetCurrentMonotonicMicros(); 46 int64_t now = OS::GetCurrentMonotonicMicros();
47 result += (now - start_); 47 result += (now - start_);
48 } 48 }
49 return result; 49 return result;
50 } 50 }
51 51
52 int64_t MaxContiguous() const { 52 int64_t MaxContiguous() const {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 Timer* const timer_; 165 Timer* const timer_;
166 166
167 DISALLOW_ALLOCATION(); 167 DISALLOW_ALLOCATION();
168 DISALLOW_COPY_AND_ASSIGN(PauseTimerScope); 168 DISALLOW_COPY_AND_ASSIGN(PauseTimerScope);
169 }; 169 };
170 170
171 171
172 } // namespace dart 172 } // namespace dart
173 173
174 #endif // RUNTIME_VM_TIMER_H_ 174 #endif // RUNTIME_VM_TIMER_H_
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | samples-dev/swarm/SwarmApp.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698