The real answer is, it depends.
If the customs agents have a bug up their ass, or if there is some big craze over lax border security, or you have a large number of passengers that are from neither the US nor Canada, then you could sit at the border for an hour while they go through everything.
On the other hand, if your train's load is light, and there aren't any specific threats that they feel like looking for, you could be in and out in 15 minutes.
My one time on that route, I recall we were delayed at the border (meaning we left after the scheduled departure time), but the delay wasn't particularly significant.