I had no idea just how far back that rule went, though, until I saw this quote from Hall of Famer Jesse Burkett while browsing through some old sports pages (scroll/zoom to the highlighted word at the bottom right corner of the page):
I have been reading how the rule limiting the pitcher to twenty seconds on the slab before throwing will handicap "Cup". That is only a National League rule, and "Cup" is in the American, where the rule is not in force.*
"Cup" here is George Cuppy, a longtime teammate of Burkett's who had just signed with the newly formed American League. I don't know if the rule was on the books continuously from 1901-present time, but apparently the idea of a 20-second limit on pitchers dates back at least that far.
*The St. Louis Republic. (St. Louis, Mo.), 27 March 1901. Chronicling America: Historic American Newspapers. Lib. of Congress.