6-8 weeks in general. Not all humerus fractures are the same and require treatments specific to each patient. Breaks in the middle of the bone are immobilized in a splint or cast or just a sling until the broken bone ends get "sticky" and begin to move slowly as one bone. Casts are converted to braces or slings once early adequate healing is confirmed.
Cast? I am not aware of many circumstances that a broken humerus should be is a full cast... Various splints/braces are the preferred method of treating most non surgical humeral fractures. In general, broken bones heal in 6-8 weeks if no complications occur. If your doctor put you in a cast for a non complicated humeral fracture you may want to seek a second opinion.