Here's a rather formal way of describing two things that happened at the same time:
As I was waiting at the bus stop, a dark rain cloud blew in from the north.
A more casual way to describe the same situation would be:
I was waiting at the bus stop when I saw a dark rain cloud coming my way.
"As I ___, ___" is more common in written stories than in stories told out loud.