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

Side by Side Diff: src/utils-inl.h

Issue 1643473002: Revert of [heap] Parallel newspace evacuation, semispace copy, and compaction \o/ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « src/objects-inl.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_UTILS_INL_H_
6 #define V8_UTILS_INL_H_
7
8 #include "src/utils.h"
9
10 #include "include/v8-platform.h"
11 #include "src/base/platform/time.h"
12 #include "src/v8.h"
13
14 namespace v8 {
15 namespace internal {
16
17 class TimedScope {
18 public:
19 explicit TimedScope(double* result)
20 : start_(TimestampMs()), result_(result) {}
21
22 ~TimedScope() { *result_ = TimestampMs() - start_; }
23
24 private:
25 static inline double TimestampMs() {
26 return V8::GetCurrentPlatform()->MonotonicallyIncreasingTime() *
27 static_cast<double>(base::Time::kMillisecondsPerSecond);
28 }
29
30 double start_;
31 double* result_;
32 };
33
34 } // namespace internal
35 } // namespace v8
36
37 #endif // V8_UTILS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698