MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / exec

Method exec

source/src/scriptinterpreter.cpp:465–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463{
464 QiFunc_time_ntp_ms() : QiFunc(0, 1) {}
465 QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override
466 {
467 NtpClient ntp;
468 if (args.empty())
469 {
470 for (auto& s : ntp_servers)
471 {
472 auto t = ntp.unix64(s, 123, 500);
473 if (t) return *t;
474 }
475 }
476 else
477 {
478 auto t = ntp.unix64(args[0].toString(), 123, 500);
479 if (t) return *t;
480 }
481 return {};
482 }
483};
484
485/*

Callers

nothing calls this directly

Calls 2

unix64Method · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected