File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change 1
1
2
- sleep = ( ms ) {
2
+ sleep = ( ms ) => {
3
3
return new Promise ( r => setTimeout ( r , ms ) )
4
- } ,
4
+ } ;
5
5
6
- delay ( 100 )
7
- . then ( function STEP2 ( ) {
8
- console . log ( "step 2 (after 100ms)" ) ;
9
- return delay ( 200 ) ;
10
- } )
11
- . then ( function STEP3 ( ) {
12
- console . log ( "step 3 (after another 200ms)" ) ;
13
- } )
14
- . then ( function STEP4 ( ) {
15
- console . log ( "step 4 (next Job)" ) ;
16
- return delay ( 50 ) ;
17
- } )
18
- . then ( function STEP5 ( ) {
19
- console . log ( "step 5 (after another 55ms)" ) ;
20
- } )
6
+ sleep ( 100 )
7
+ . then ( function STEP2 ( ) {
8
+ console . log ( "step 2 (after 100ms)" ) ;
9
+ return sleep ( 200 ) ;
10
+ } )
11
+ . then ( function STEP3 ( ) {
12
+ console . log ( "step 3 (after another 200ms)" ) ;
13
+ } )
14
+ . then ( function STEP4 ( ) {
15
+ console . log ( "step 4 (next Job)" ) ;
16
+ return sleep ( 50 ) ;
17
+ } )
18
+ . then ( function STEP5 ( ) {
19
+ console . log ( "step 5 (after another 50ms)" ) ;
20
+ } )
You can’t perform that action at this time.
0 commit comments