File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ const testArr = [];
25
25
* It continues to do this until durationSeconds after the startTime.
26
26
*/
27
27
function busyLoop ( durationSeconds ) {
28
+ const noop = ( ) => { } ;
28
29
for ( let i = 0 ; i < testArr . length ; i ++ ) {
29
30
for ( let j = 0 ; j < testArr [ i ] . length ; j ++ ) {
30
31
testArr [ i ] [ j ] = Math . sqrt ( j * testArr [ i ] [ j ] ) ;
32
+ noop ( ) ;
31
33
}
32
34
}
33
35
if ( Date . now ( ) - startTime < 1000 * durationSeconds ) {
Original file line number Diff line number Diff line change @@ -27,9 +27,11 @@ const testArr: number[][] = [];
27
27
* It continues to do this until durationSeconds after the startTime.
28
28
*/
29
29
function busyLoop ( durationSeconds : number ) {
30
+ const noop = ( ) => { } ;
30
31
for ( let i = 0 ; i < testArr . length ; i ++ ) {
31
32
for ( let j = 0 ; j < testArr [ i ] . length ; j ++ ) {
32
33
testArr [ i ] [ j ] = Math . sqrt ( j * testArr [ i ] [ j ] ) ;
34
+ noop ( ) ;
33
35
}
34
36
}
35
37
if ( Date . now ( ) - startTime < 1000 * durationSeconds ) {
You can’t perform that action at this time.
0 commit comments