I'd look into where it was from and find out why they're getting rid of it, if possible. If it's because they didn't like the flavors it was producing (acetic, etc), you might want to give it a good cleaning first.
Also, if it's already dumped, you'll want to fill it as fast as possible, either with beer or with a holding/cleaning solution.
As for primary fermentation in barrels, plenty of breweries are doing it now:
Jester King and
Crooked Stave to name a couple
If you already have the barrel, don't have the beer ready, and don't want to fill with a holding solution, it's an option. Just leave some headspace for primary fermentation (and still expect some blowoff), then be sure to have some add'l beer for topping off once primary slows down.
As for time, the beer will tell you. Install a Vinnie nail and take a sample every couple months.