If 11PM is in A1, this will return the difference between the time in B1 and 11PM

=B1-A1+(B1-A1<-0.5)

with the custom format of [m]
12:02 AM returns 62
10:45 PM returns -15