diff options
Diffstat (limited to 'benchmark/dgram/single-buffer.js')
-rw-r--r-- | benchmark/dgram/single-buffer.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/dgram/single-buffer.js b/benchmark/dgram/single-buffer.js index 0bf650d265..d183b9cd1d 100644 --- a/benchmark/dgram/single-buffer.js +++ b/benchmark/dgram/single-buffer.js @@ -29,11 +29,11 @@ function main({ dur, len, num, type }) { } } - socket.on('listening', function() { + socket.on('listening', () => { bench.start(); onsend(); - setTimeout(function() { + setTimeout(() => { const bytes = (type === 'send' ? sent : received) * chunk.length; const gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); @@ -41,7 +41,7 @@ function main({ dur, len, num, type }) { }, dur * 1000); }); - socket.on('message', function() { + socket.on('message', () => { received++; }); |