mirror of
https://github.com/amark/gun.git
synced 2025-06-06 14:16:44 +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);
|
flush(peer);
|
||||||
}
|
}
|
||||||
peer.batch = []; // peer.batch = '['; // TODO: Prevent double JSON!
|
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);
|
send(raw, peer);
|
||||||
}
|
}
|
||||||
function flush(peer){
|
function flush(peer){
|
||||||
|
@ -152,6 +152,7 @@
|
|||||||
if(s.gone){ return } s.gone = true;
|
if(s.gone){ return } s.gone = true;
|
||||||
s.seq = [];
|
s.seq = [];
|
||||||
map(s.files, function(mem, file){ s.seq.push({file: file, mem: mem}) });
|
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.files = null;
|
||||||
s.c = 0;
|
s.c = 0;
|
||||||
s.merge(s.c);
|
s.merge(s.c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user