Skip to content

Commit

Permalink
match exactly the MUI X sleep helper
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Sep 16, 2023
1 parent 5ba5769 commit 12816a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function getStyleValue(value: string) {
return parseInt(value, 10) || 0;
}

function sleep(time: number): Promise<void> {
function sleep(duration: number): Promise<void> {
return new Promise<void>((res) => {
setTimeout(res, time);
setTimeout(res, duration);
});
}

Expand Down

0 comments on commit 12816a2

Please sign in to comment.