18 lines
317 B
JavaScript
Executable file
18 lines
317 B
JavaScript
Executable file
'use strict';
|
|
|
|
const Piscina = require('../../dist/src');
|
|
|
|
let time;
|
|
module.exports = {
|
|
send: async () => {
|
|
const data = new ArrayBuffer(128);
|
|
try {
|
|
return Piscina.move(data);
|
|
} finally {
|
|
setTimeout(() => { time = data.byteLength; }, 1000);
|
|
}
|
|
},
|
|
get: () => {
|
|
return time;
|
|
}
|
|
};
|