It can take an hour. You need a full copy of the old passport, every page with a stamp and face page of your new passport. Also you have to complete and sign every page. And you need to fill out forms as well.
Some idiot at the border stamped wherever he wanted instead of in neat spaces where they should have previously stamped, anyways it wasted a full page adding to the 2 visas pages and I was gone. New passport required.
I suggest get a new passport unless you have a lot of space on other pages.