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

Side by Side Diff: runtime/bin/utils_macos.cc

Issue 12282051: Prepare for removal of source_filter.gypi: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/utils_linux.cc ('k') | runtime/bin/utils_win.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include <errno.h> 5 #include "platform/globals.h"
6 #include <netdb.h> 6 #if defined(TARGET_OS_MACOS)
7 #include <sys/time.h> 7
8 #include <errno.h> // NOLINT
9 #include <netdb.h> // NOLINT
10 #include <sys/time.h> // NOLINT
8 11
9 #include "bin/utils.h" 12 #include "bin/utils.h"
10 #include "platform/assert.h" 13 #include "platform/assert.h"
11 14
12 OSError::OSError() : sub_system_(kSystem), code_(0), message_(NULL) { 15 OSError::OSError() : sub_system_(kSystem), code_(0), message_(NULL) {
13 set_sub_system(kSystem); 16 set_sub_system(kSystem);
14 set_code(errno); 17 set_code(errno);
15 SetMessage(strerror(errno)); 18 SetMessage(strerror(errno));
16 } 19 }
17 20
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 79 }
77 80
78 int64_t TimerUtils::GetCurrentTimeMicros() { 81 int64_t TimerUtils::GetCurrentTimeMicros() {
79 struct timeval tv; 82 struct timeval tv;
80 if (gettimeofday(&tv, NULL) < 0) { 83 if (gettimeofday(&tv, NULL) < 0) {
81 UNREACHABLE(); 84 UNREACHABLE();
82 return 0; 85 return 0;
83 } 86 }
84 return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec; 87 return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
85 } 88 }
89
90 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/utils_linux.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698