It really depends on the kind of ticket you have.
Is your flight/baggage checked in all the way through to your destination? Or are you transferring to another airline?
My point of entry was Vancouver, but with the same airline all the way through Toronto. So I didn't go through immigration in Vancouver, we were just told to stay in a waiting lounge and wait till we boarded the aircraft again. In this case two hours is enough.
If you have to board another aircraft, I think two hours is not enough.