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

Method exec

source/src/scriptinterpreter.cpp:177–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175{
176 QiFunc_time_ms() : QiFunc(0, 4) {}
177 QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override
178 {
179 if (args.empty()) return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
180 return TimeToMs(args[0].toInteger(),
181 args.size() > 1 ? args[1].toInteger() : 0,
182 args.size() > 2 ? args[2].toInteger() : 0,
183 args.size() > 3 ? args[3].toInteger() : 0
184 );
185 }
186};
187/*
188int timestamp: sec

Callers

nothing calls this directly

Calls 3

TimeToMsFunction · 0.85
toIntegerMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected