The length of the bar, measured by the number of note values it contains, is normally indicated by the time signature.
The earliest bar lines, used in keyboard and vihuela music in the 15th and 16th centuries, didn't reflect a regular meter at all but were only section divisions, or in some cases marked off every beat.
Bar lines began to be introduced into ensemble music in the late 16th century but continued to be used irregularly.
Not until the mid-17th century were bar lines used in the modern style with every measure being the same length, and they began to be associated with time signatures.
[3] Modern editions of early music that was originally notated without bar lines sometimes use a mensurstrich as a compromise.