mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibJS: Port to Windows
This commit is contained in:
parent
a291a7f770
commit
52d0341c5d
Notes:
github-actions[bot]
2025-02-06 22:17:49 +00:00
Author: https://github.com/stasoid
Commit: 52d0341c5d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2917
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 10 additions and 4 deletions
|
@ -5,10 +5,10 @@
|
|||
*/
|
||||
|
||||
#include <AK/Time.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibJS/Contrib/Test262/AgentObject.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace JS::Test262 {
|
||||
|
||||
|
@ -41,7 +41,7 @@ JS_DEFINE_NATIVE_FUNCTION(AgentObject::monotonic_now)
|
|||
JS_DEFINE_NATIVE_FUNCTION(AgentObject::sleep)
|
||||
{
|
||||
auto milliseconds = TRY(vm.argument(0).to_i32(vm));
|
||||
::usleep(milliseconds * 1000);
|
||||
(void)Core::System::sleep_ms(milliseconds);
|
||||
return js_undefined();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue