The only free and comprehensive online etymological dictionary of the Spanish language
-s (2) Adverbial marker.
Penny (2002) writes: "This so-called 'adverbial s' has its origins in a number of Latin adverbs which, for a variety of reasons, ended in /s/." Because s was so ubiquitous during the period of Old Spanish, it was mistakenly generalized to be a marker of adverbs and applied to any that lacked it, like antes (Old Spanish ante) and entonces (Old Spanish entonz).