| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library dart.fletch.os; | 5 library dart.fletch.os; |
| 6 | 6 |
| 7 import 'dart:fletch._system' as fletch; | 7 import 'dart:fletch._system' as fletch; |
| 8 import 'dart:fletch'; | 8 import 'dart:fletch'; |
| 9 import 'dart:fletch.ffi'; | 9 import 'dart:fletch.ffi'; |
| 10 | 10 |
| 11 part 'native_process.dart'; | 11 part 'native_process.dart'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 27 timespec.tv_sec = milliseconds ~/ 1000; | 27 timespec.tv_sec = milliseconds ~/ 1000; |
| 28 timespec.tv_nsec = (milliseconds % 1000) * 1000000; | 28 timespec.tv_nsec = (milliseconds % 1000) * 1000000; |
| 29 int result; | 29 int result; |
| 30 try { | 30 try { |
| 31 result = _nanosleep.icall$2Retry(timespec, timespec); | 31 result = _nanosleep.icall$2Retry(timespec, timespec); |
| 32 } finally { | 32 } finally { |
| 33 timespec.free(); | 33 timespec.free(); |
| 34 } | 34 } |
| 35 if (result != 0) throw "Failed to call 'nanosleep': ${Foreign.errno}"; | 35 if (result != 0) throw "Failed to call 'nanosleep': ${Foreign.errno}"; |
| 36 } | 36 } |
| OLD | NEW |