Depends on the 2 y old.
DS1 would have managed ten or twenty minutes.
DS2 would have been happy to play alone for hours, even at that age. By the time I found him he would have wrecked the house though. 
DS3 would not even have let me leave the room.
DD again would have played happily for hours, in her case without breaking or ruining anything.