I was reading a book called "The Penguin Guide to Punctuation" by R. L. Trask. It seems that the book doesn't explain all the uses of comma. It says "There are four uses of the comma, called the listing comma, the joining comma, the gapping comma and bracketing commas".
Here's a brief summary of the rules as described in book:
The listing comma: Use a listing comma in a list wherever you could conceivably use the word and (or or) instead. Do not use a listing comma anywhere else. Example: The Three Musketeers were Athos, Porthos and Aramis.
The joining comma: Use a joining comma to join two complete sentences with one of the words and, or, but, yet or while. Do not use a joining comma in any other way. Example: Norway has applied to join the EC, and Sweden is expected to do the same.
The gapping comma: Use a gapping comma to show that words have been omitted instead of repeated. Example: Some Norwegians wanted to base their national language on the speech of the capital city; others, on the speech of the rural countryside.
The bracketing comma: Use a pair of bracketing commas to set off a weak interruption. Example: Schliemann, of course, did his digging before modern archaeology was invented.
In the following examples, which type of comma is being used?
After two hours, the train came to the station.
Before I could talk to her, she was gone.
It appears to me that the above usage of commas doesn't meet any of the comma rules described in the book.