Thankfully, a Douglas-Adams-style planetwide simulation was done to find out. Monkeys evolved 30 million years ago and one completed writing the works of William Shakespeare around 400 years ago. Now that we know the answer is about 30 million years, they should be shutting the simulation down any day now.