Milena began studying when her digital clock showed 20:14, and only stopped when the clock showed the same digits again, for the last time before midnight. How long had she studied?

Notes: To show the same digits means that, if the clock shows 13:15, that clock shows the same digits next at 15:13.