Then you can configure your grid accordingly and turn on Grid Snap. This will work for orthographic lines only though, so for anything on an angle you’ll need to enter the length manually.
You can constrain the length but it’s a lot of typing.
Start a line
When it asks for the next point, type 10
The length of the next segment will be constrained to 10 units.
Show a direction by typing and angle or clicking a direction.
The last segment will be 10 units long.
You could repeat this for the maximum amount of time you would click and the command stops when you press enter. This would do what you are trying to do.