MCPcopy Create free account
hub / github.com/NativeScript/android / PerformanceNowCallback

Method PerformanceNowCallback

test-app/runtime/src/main/cpp/Runtime.cpp:943–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

941}
942
943void Runtime::PerformanceNowCallback(
944 const v8::FunctionCallbackInfo<v8::Value>& args) {
945 auto isolate = args.GetIsolate();
946 auto runtime = Runtime::GetRuntime(isolate);
947 // Difference in seconds * 1000 for ms
948 double ms =
949 (platform->MonotonicallyIncreasingTime() - runtime->m_startTime) * 1000.0;
950 args.GetReturnValue().Set(ms);
951}
952
953void Runtime::DestroyRuntime() {
954 s_id2RuntimeCache.erase(m_id);

Callers

nothing calls this directly

Calls 3

GetReturnValueMethod · 0.80
GetIsolateMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected