简体   繁体   中英

updating client time with website time that uses lightstreamer

I want to update time of my pc with the website in which use Lightstreamer for updating its time. In the debugging tab in chrome devtools, I found that the time value is updated in which line:

    define("lscAZ", ["LoggerManager", "IllegalArgumentException", "lscAe"], function (d, f, b) {
    function a(a, b, c, d, f) { this.Ay = b; this.zy = a; this.qu = d; this.ma = c; **this.Sd = f** } var c = d.getLoggerProxy(b.Ok); a.prototype = {
        Bm: function () { return this.zy }, lj: function () { return this.Ay }, getValue: function (a) { a = this.ei(a); return (a = this.Sd[a]) && a.QC ? a.value : a }, Cr: function (a) { a = this.ei(a); return !this.Sd.Ao[a] }, py: function () { return this.qu }, forEachChangedField: function (a) {
            for (var b = this.Sd.Mc, f = 0; f < b.length; f++) {
                var k = this.ma.getName(b[f]),
                h = this.Sd[b[f] + 1]; try { a(k, b[f], h) } catch (l) { c.logErrorExc(l, d.resolve(402)) }
            }
        }, Eq: function (a) { for (var b = 2; b < this.Sd.length; b++) { var f = b - 1, k = this.ma.getName(f), h = this.Sd[b]; try { a(k, f, h) } catch (l) { c.logErrorExc(l, d.resolve(403)) } } }, ei: function (a) { a = isNaN(a) ? this.ma.oe(a) : a; if (null == a) throw new f("the specified field does not exist"); if (0 >= a || a > this.ma.ym() + 1) throw new f("the specified field position is out of bounds"); return a + 1 }, cx: function () { return this.Sd.length - 2 }, Kw: function (a) { return this.ma.getName(a) }
    };
    a.prototype.getItemName = a.prototype.Bm; a.prototype.getItemPos = a.prototype.lj; a.prototype.getValue = a.prototype.getValue; a.prototype.isValueChanged = a.prototype.Cr; a.prototype.isSnapshot = a.prototype.py; a.prototype.forEachChangedField = a.prototype.forEachChangedField; a.prototype.forEachField = a.prototype.Eq; return a
});

In this code, the value Sd or f belongs to the website's time. the problem is that I don't know where can I find the calculation process of f and how to call the above code function to catch this value in console (I can't even recognize the name of function.), On the other hand. the clock updated by a function that use output of this function as updateInfo named construct and use it in the website. these all are automatically and I need to do it manually with less intervals.

calculation of f is more useful for me because this value is formatted to string and doesn't contain milliseconds (formatted as hh:mm:ss).

configuration of Lightstreamer is as below

 /*
 * LIGHTSTREAMER - www.lightstreamer.com
 * Lightstreamer Web Client
 * Version 7.2.0 build 1777
 * Copyright (c) Lightstreamer Srl. All Rights Reserved.
 * Contains: LightstreamerClient, Subscription, ConnectionSharing, SimpleLoggerProvider
 *   ConsoleAppender, Promise
 * Globals
 */

Please note that, since version 8.0.0, Lightstreamer Web Client SDK Library is open source and can be found at https://github.com/Lightstreamer/Lightstreamer-lib-client-javascript

This may be of help with your efforts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM