mirror of
https://github.com/danbulant/node-x11
synced 2026-05-23 06:19:01 +00:00
return roundtrip time in ping() callback
This commit is contained in:
parent
f3681b9aa2
commit
8e1f501701
1 changed files with 2 additions and 1 deletions
|
|
@ -87,9 +87,10 @@ XClient.prototype.terminate = function()
|
|||
// GetAtomName used as cheapest non-modifying request with reply
|
||||
// 3 - id for shortest standard atom, "ARC"
|
||||
XClient.prototype.ping = function(cb) {
|
||||
var start = Date.now();
|
||||
this.GetAtomName(3, function(err, str) {
|
||||
if (err) return cb(err);
|
||||
return cb();
|
||||
return cb(null, Date.now() - start);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue