Etymology
Today it means: While departing; so as to leave. Full definition →
From departing + -ly.
Etymology from Wiktionary, CC BY-SA 4.0.