Look up how Unity‘s FixedUpdate solves this: it’s a commonly used mechanism you might take inspiration from. FixedUpdate is called a fixed number of times per second; you decide how many by setting the fixedDeltaTime value in settings, which by default is 0.02s. Unity will always run this 50 times per second. Doing so any calculations inside the FixedUpdate should be accurate. This is necessary because whatever real-time system you’re developing, you must to account for occasional frame drops and your physic simulations must not depend on time deltas.
It’s not too hard to implement the same mechanism in your own system. You can even do it in a separate thread.
Side note: FixedUpdate, as it runs many times in one frame, can easily become heavy so it’s good to make a minimal use of it.