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

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

Issue 8463032: Wait on the monotonic clock to guard against changes to the system clock. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/thread_linux.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_GLOBALS_H_ 5 #ifndef VM_GLOBALS_H_
6 #define VM_GLOBALS_H_ 6 #define VM_GLOBALS_H_
7 7
8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf. 8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf.
9 #ifndef __STDC_FORMAT_MACROS 9 #ifndef __STDC_FORMAT_MACROS
10 #define __STDC_FORMAT_MACROS 10 #define __STDC_FORMAT_MACROS
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Bit sizes. 151 // Bit sizes.
152 const int kBitsPerByte = 8; 152 const int kBitsPerByte = 8;
153 const int kBitsPerByteLog2 = 3; 153 const int kBitsPerByteLog2 = 3;
154 const int kBitsPerWord = kWordSize * kBitsPerByte; 154 const int kBitsPerWord = kWordSize * kBitsPerByte;
155 155
156 // System-wide named constants. 156 // System-wide named constants.
157 const int KB = 1024; 157 const int KB = 1024;
158 const int MB = KB * KB; 158 const int MB = KB * KB;
159 const int GB = KB * KB * KB; 159 const int GB = KB * KB * KB;
160 160
161 // Time constants.
162 const int kMillisecondsPerSecond = 1000;
163 const int kMicrosecondsPerMillisecond = 1000;
164 const int kMicrosecondsPerSecond = (kMicrosecondsPerMillisecond *
165 kMillisecondsPerSecond);
166 const int kNanosecondsPerMicrosecond = 1000;
167 const int kNanosecondsPerMillisecond = (kNanosecondsPerMicrosecond *
168 kMicrosecondsPerMillisecond);
169 const int kNanosecondsPerSecond = (kNanosecondsPerMicrosecond *
170 kMicrosecondsPerSecond);
171
161 // A macro to disallow the copy constructor and operator= functions. 172 // A macro to disallow the copy constructor and operator= functions.
162 // This should be used in the private: declarations for a class. 173 // This should be used in the private: declarations for a class.
163 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ 174 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
164 private: \ 175 private: \
165 TypeName(const TypeName&); \ 176 TypeName(const TypeName&); \
166 void operator=(const TypeName&) 177 void operator=(const TypeName&)
167 178
168 179
169 // A macro to disallow all the implicit constructors, namely the default 180 // A macro to disallow all the implicit constructors, namely the default
170 // constructor, copy constructor and operator= functions. This should be 181 // constructor, copy constructor and operator= functions. This should be
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // contants are 16 byte aligned. 338 // contants are 16 byte aligned.
328 #if defined(TARGET_OS_WINDOWS) 339 #if defined(TARGET_OS_WINDOWS)
329 #define ALIGN16 __declspec(align(16)) 340 #define ALIGN16 __declspec(align(16))
330 #else 341 #else
331 #define ALIGN16 __attribute__((aligned(16))) 342 #define ALIGN16 __attribute__((aligned(16)))
332 #endif 343 #endif
333 344
334 } // namespace dart 345 } // namespace dart
335 346
336 #endif // VM_GLOBALS_H_ 347 #endif // VM_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698