Skip to content

Commit cdd09d5

Browse files
committed
(#85) Switched to higher resolution wait
1 parent 97cd758 commit cdd09d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/mouse.class.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NativeAdapter } from "./adapter/native.adapter.class";
22
import { Button } from "./button.enum";
33
import { linear } from "./movementtype.function";
44
import { Point } from "./point.class";
5-
import { sleep } from "./sleep.function";
5+
import { busyWaitForNanoSeconds, sleep } from "./sleep.function";
66

77
export class Mouse {
88
public config = {
@@ -37,7 +37,7 @@ export class Mouse {
3737
for (let idx = 0; idx < pathSteps.length; ++idx) {
3838
const node = pathSteps[idx];
3939
const minTime = timeSteps[idx];
40-
await sleep(minTime);
40+
await busyWaitForNanoSeconds(minTime);
4141
await this.native.setMousePosition(node);
4242
}
4343
resolve(this);

0 commit comments

Comments
 (0)