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

Side by Side Diff: runtime/vm/os_win.cc

Issue 24255013: - Write the coverage data to a file instead of printing to stdout. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
« runtime/vm/json_stream.h ('K') | « runtime/vm/os_macos.cc ('k') | no next file » | 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 "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 #include "vm/vtune.h" 9 #include "vm/vtune.h"
10 10
11 #include <malloc.h> // NOLINT 11 #include <malloc.h> // NOLINT
12 #include <process.h> // NOLINT
12 #include <time.h> // NOLINT 13 #include <time.h> // NOLINT
13 14
14 #include "platform/utils.h" 15 #include "platform/utils.h"
15 #include "platform/assert.h" 16 #include "platform/assert.h"
16 17
17 namespace dart { 18 namespace dart {
18 19
19 const char* OS::Name() { 20 const char* OS::Name() {
20 return "windows"; 21 return "windows";
21 } 22 }
22 23
23 24
25 intptr_t OS::ProcessId() {
26 return static_cast<intptr_t>(GetCurrentProcessId());
27 }
28
29
24 // As a side-effect sets the globals _timezone, _daylight and _tzname. 30 // As a side-effect sets the globals _timezone, _daylight and _tzname.
25 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) { 31 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) {
26 time_t seconds = static_cast<time_t>(seconds_since_epoch); 32 time_t seconds = static_cast<time_t>(seconds_since_epoch);
27 if (seconds != seconds_since_epoch) return false; 33 if (seconds != seconds_since_epoch) return false;
28 // localtime_s implicitly sets _timezone, _daylight and _tzname. 34 // localtime_s implicitly sets _timezone, _daylight and _tzname.
29 errno_t error_code = localtime_s(tm_result, &seconds); 35 errno_t error_code = localtime_s(tm_result, &seconds);
30 return error_code == 0; 36 return error_code == 0;
31 } 37 }
32 38
33 39
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 317 }
312 318
313 319
314 void OS::Exit(int code) { 320 void OS::Exit(int code) {
315 exit(code); 321 exit(code);
316 } 322 }
317 323
318 } // namespace dart 324 } // namespace dart
319 325
320 #endif // defined(TARGET_OS_WINDOWS) 326 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« runtime/vm/json_stream.h ('K') | « runtime/vm/os_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698