The actual time depends on how busy the course is, how many people you are playing with and how many strokes everyone takes (a round of 72 will obviously be faster than a round of 112).
A golfer playing alone on a course that is not crowded should be able to finish in 2 and a half hours or less.
A foursome playing a very crowded course might wind up spending 5 or even 6 hours on the golf course.
To keep things moving, all friendly matches (rounds of golf that are not played in tournaments or for money) should be played by the principles of "ready golf."
For suggestions on ready golf and keeping play moving, read the "Maintain a Good Pace" section of the Golf Etiquette primer.