What should I use to get the double-click time?

Unfortunately there’s no cross-desktop standard for settings like this. GTK has a setting called gtk-double-click-time. On Wayland, it’s implemented by reading a GNOME-specific setting via the Settings portal (over D-Bus), or by reading that setting directly using the GSettings API when outside of flatpak.

Using the Settings portal is probably your best option. There’s apparently a native Rust implementation available:

The namespace is org.gnome.desktop.peripherals.mouse, and the key is double-click.

That said, I’ve just discovered that the portal implementations (xdg-desktop-portal-gtk and -gnome) are still using an old schema name, so that setting is currently broken. You can still use it with the hardcoded fallback that you need anyway, and it will start working once they’re fixed (PRs incoming).