In practice: I use JVN’s spreadsheet.
In theory: Here’s the high level (hand-wavey) of how to think about it:
You are looking to solve your system for the velocity at any given time. With that info, you can determine at what time velocity has reached it’s maximum value.
At a given rotational speed and input voltage, a motor will draw a certain amount of current.
The amount of current dictates the amount of torque at the output of the motor shaft.
The torque at the motor shaft is transferred through gears, levers, and pulleys to be a force on the mass of the arm or the mass of the elevator. Friction will reduce the output force somewhat.
This force combines with gravity to create a net acceleration on the arm/elevator. (F=ma).
Over time, acceleration will cause the speed of the arm/elevator to change. The same mess of levers/pulleys/gears transfers that speed back to the motor input shaft.
The speed at the motor input shaft “feeds back” to the start of this whole thing, dictating the output force of the motor.
The loopback nature of that final statement, combined with the fact that velocity is the integral over time of acceleration, makes the velocity-over-time question a differential equation to solve. If you solve that diffeq, you get a function with respect to time which indicates your velocity.
Your “Time to max speed” is the duration from the start of motion, up till velocity has reached a steady-state max.