MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / constructor

Method constructor

modules/network/sntp/sntp.js:35–46  ·  view source on GitHub ↗
(dictionary, callback)

Source from the content-addressed store, hash-verified

33 #address;
34
35 constructor(dictionary, callback) {
36 super({kind: "UDP"});
37 this.#callback = callback;
38 this.#timer = Timer.repeat(() => {
39 if (!--this.#retry)
40 return this.failed("no response from SNTP server");
41
42 this.write();
43 this.#callback(SNTP.retry);
44 }, 5000);
45 this.start(dictionary.host);
46 }
47 start(host) {
48 this.#retry = 5;
49

Callers

nothing calls this directly

Calls 4

failedMethod · 0.95
writeMethod · 0.95
startMethod · 0.95
repeatMethod · 0.80

Tested by

no test coverage detected