Hi PG I see nothing wrong with your sentence. When would also be possible but I'd prefer while since the working lasted a long time. Would means used to .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.