mirror of
https://github.com/amark/gun.git
synced 2025-06-05 21:56:51 +00:00
how long is 1ms in actuality?
This commit is contained in:
parent
fa5fe8a325
commit
e6b61f667e
6
gun.js
6
gun.js
@ -2069,7 +2069,11 @@
|
||||
flush(peer);
|
||||
}
|
||||
peer.batch = []; // peer.batch = '['; // TODO: Prevent double JSON!
|
||||
setTimeout(function(){flush(peer)}, opt.gap);
|
||||
var S, ST; LOG && (S = +new Date);
|
||||
setTimeout(function(){
|
||||
LOG && (ST = +new Date - S) > 9 && opt.log(S, ST, '1ms TO');
|
||||
flush(peer)
|
||||
}, opt.gap);
|
||||
send(raw, peer);
|
||||
}
|
||||
function flush(peer){
|
||||
|
@ -152,6 +152,7 @@
|
||||
if(s.gone){ return } s.gone = true;
|
||||
s.seq = [];
|
||||
map(s.files, function(mem, file){ s.seq.push({file: file, mem: mem}) });
|
||||
LOG && opt.log(+new Date, s.seq.length, "rad files #");
|
||||
s.files = null;
|
||||
s.c = 0;
|
||||
s.merge(s.c);
|
||||
|
Loading…
x
Reference in New Issue
Block a user