Idioms
while the getting is good (North American English)
(also while the going is good especially in British English)
before a situation changes and it is no longer possible to do something 趁形势还未变化时;趁情况还有利时