Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

396 B
Raw Blame
use crate::context_bootstrap::performance_runtime::performance_now;
use moli_webapi_declare::v8;

pub(in crate::context_bootstrap) fn performance_now_callback<'s>(
    scope: &mut v8::PinScope<'s, '_>,
    args: v8::FunctionCallbackArguments<'s>,
    mut rv: v8::ReturnValue<'_, v8::Value>,
) {
    let now = performance_now(scope, args.this());
    rv.set(v8::Number::new(scope, now).into());
}