The official word is "up to" 3 hours, but in reality it has been exactly 3 hours from the scheduled closing time for the park (or, in Epcot's case, the scheduled closing time for the last section of the park, since all of the EMH attractions stay open until park closing anyway).