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

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

Issue 1367973004: Make timeline use the same clock source as mojo's tracing infrastructure (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/json_stream.cc ('k') | runtime/vm/os_android.cc » ('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 VM_OS_H_ 5 #ifndef VM_OS_H_
6 #define VM_OS_H_ 6 #define VM_OS_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 9
10 // Forward declarations. 10 // Forward declarations.
(...skipping 29 matching lines...) Expand all
40 static int GetLocalTimeZoneAdjustmentInSeconds(); 40 static int GetLocalTimeZoneAdjustmentInSeconds();
41 41
42 // Returns the current time in milliseconds measured 42 // Returns the current time in milliseconds measured
43 // from midnight January 1, 1970 UTC. 43 // from midnight January 1, 1970 UTC.
44 static int64_t GetCurrentTimeMillis(); 44 static int64_t GetCurrentTimeMillis();
45 45
46 // Returns the current time in microseconds measured 46 // Returns the current time in microseconds measured
47 // from midnight January 1, 1970 UTC. 47 // from midnight January 1, 1970 UTC.
48 static int64_t GetCurrentTimeMicros(); 48 static int64_t GetCurrentTimeMicros();
49 49
50 // Returns the current time used by the tracing infrastructure.
51 static int64_t GetCurrentTraceMicros();
52
50 // Returns a cleared aligned array of type T with n entries. 53 // Returns a cleared aligned array of type T with n entries.
51 // Alignment must be >= 16 and a power of two. 54 // Alignment must be >= 16 and a power of two.
52 template<typename T> 55 template<typename T>
53 static T* AllocateAlignedArray(intptr_t n, intptr_t alignment) { 56 static T* AllocateAlignedArray(intptr_t n, intptr_t alignment) {
54 T* result = reinterpret_cast<T*>(OS::AlignedAllocate(n * sizeof(*result), 57 T* result = reinterpret_cast<T*>(OS::AlignedAllocate(n * sizeof(*result),
55 alignment)); 58 alignment));
56 memset(result, 0, n * sizeof(*result)); 59 memset(result, 0, n * sizeof(*result));
57 return result; 60 return result;
58 } 61 }
59 62
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 static void Shutdown(); 149 static void Shutdown();
147 150
148 static void Abort(); 151 static void Abort();
149 152
150 static void Exit(int code); 153 static void Exit(int code);
151 }; 154 };
152 155
153 } // namespace dart 156 } // namespace dart
154 157
155 #endif // VM_OS_H_ 158 #endif // VM_OS_H_
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/os_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698