OLD | NEW |
1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 #include "src/vm/natives.h" | 5 #include "src/vm/natives.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <math.h> | 8 #include <math.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
11 #include "src/shared/bytecodes.h" | 11 #include "src/shared/bytecodes.h" |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 BEGIN_NATIVE(EventHandlerSleep) { | 1514 BEGIN_NATIVE(EventHandlerSleep) { |
1515 int64 timeout = | 1515 int64 timeout = |
1516 AsForeignInt64(arguments[0]) + Platform::GetMicroseconds() / 1000; | 1516 AsForeignInt64(arguments[0]) + Platform::GetMicroseconds() / 1000; |
1517 Port* port = Port::FromDartObject(arguments[1]); | 1517 Port* port = Port::FromDartObject(arguments[1]); |
1518 EventHandler::GlobalInstance()->ScheduleTimeout(timeout, port); | 1518 EventHandler::GlobalInstance()->ScheduleTimeout(timeout, port); |
1519 return process->program()->null_object(); | 1519 return process->program()->null_object(); |
1520 } | 1520 } |
1521 END_NATIVE() | 1521 END_NATIVE() |
1522 | 1522 |
1523 } // namespace fletch | 1523 } // namespace fletch |
OLD | NEW |