[Question]
  [
You are an employee of Microteque, a leading Silicon Valley startup creating smart microwave ovens for all kinds of strange places. Your customers can get their microwaves printed with patterns to match their kitchens, campers, man caves; even the kitchens of large nation-state facilities have shiny new branded microwave ovens.
Due to the cutting-edge nature of your microwave control board technology, you've ended up having to use the programming language MicrowaveX\* and you're working out how to program the time counter. Your counter looks like this:
[![seven segment display showing 88:88](https://i.stack.imgur.com/M86e4.png)](https://i.stack.imgur.com/M86e4.png)
Your goal is to write a program that takes the input time and translates it into the number of seconds that the microwave needs to run.
As input, the function must take a string in the format `##:##` (including the colon at position 3) and return an integer.
Please note that it should also be able to handle more than 60 seconds in the seconds slot.
Finally, due to some pesky regulations, you cannot have your microwave oven run for more than 100 minutes (6,000 seconds)
Sample inputs and outputs:
`01:30` --> 90 seconds
`00:66` --> 66 seconds
`01:99` --> 159 seconds
`02:39` --> 159 seconds
`99:99` --> 6,000 seconds (capped at 100 minutes due to aforementioned regulations)
\*: MicrowaveX happens to be identical to your programming language of choice, but Microteque has rebranded it to sound more appealing to their investors.
  
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + GNU utilities, 33 bytes
```
dc<<<[6000]sL${1/:/ 60*}+dlLx\<Lp
```
[Try it online!](https://tio.run/##S0oszvj/PyXZxsYm2szAwCC22Eel2lDfSl/BzECrVjslx6cixsan4P///waGVsYGAA "Bash – Try It Online")
[Or try the test suite.](https://tio.run/##TY7NCsIwEITv@xRL6Mmi3VooJMTe9FTwAdRDbIIptEnpDxbEZ6@1qHgZBr6ZYa6qs1Ohesya1t9aVaOUbH88sEkXUspTSkSXLg8ecSQiTGn1DHWVj2eZN9McAyhs7TUO4YifAYC7LSuDrVEaS9cMfVU6A4jaz4JoCutx7ZAFP4i7DNkCN9H3xh9mS9mZiWKREBCJNIXZcw60FQkHzt/@BQ)
The input string is passed as an argument, and the output is on stdout.
---
**How it works**
First bash expands ${1/:/ 60\*} by taking argument 1 and replacing the `:` with `60*` (there's a space before the `60` that StackExchange isn't displaying here). For example, if the input is `01:30`, the expansion is `01 60*30`.
Also, `\<` gets used as the character `<` without its special meaning in the shell.
So what happens is that `dc` is run with
`[6000]sL`minutes`60*`seconds`+dlLx<Lp`
as its program (where "minutes" and "seconds" refer to the actual two-digit numbers).
This carries out the following operations:
```
[6000]               Definition of a macro which pushes 6000 on the stack.
sL                   Save the macro in register L.
minutes 60*seconds+  Compute minutes*60+seconds,
                        which is the total number of seconds.
d                    Duplicate the total number of seconds on the stack.
lLx                  Run macro L, which pushes 6000 on the stack.
                     The stack now looks like:
                        #seconds #seconds 6000
                        (top of stack on the right).
<L                   Pop 6000 and #seconds from the stack;
                        if 6000 < #seconds,
                          then run macro L to push 6000 on the stack again.
                     At this point, the item at the top of the stack is:
                        #seconds, if #seconds <= 6000,
                        6000, if #seconds > 6000.
p                    Print the top of the stack.
```
[Answer]
# [Python 2](https://docs.python.org/2/), 42 bytes
```
lambda t:min(int(t[:2])*60+int(t[3:]),6e3)
```
[Try it online!](https://tio.run/##RczRCsIgGIbhc6/iP0urxe8kQcFuZElYbUzYbExjdPXWjOjw4f34plfqH6HOnTnnwY3Xu4OkRx@oD4mmRteWbSXuvhLasr1sBctL74cWuCZwc7EFA7NbLj5Mz0TZIU6DT3QDVXWCDSPgYmznBB1dtw1aBsbA@ljMLcvItcCyV0gQtZQFUpJPUaqAHxXBWou/lPo1iYhv "Python 2 – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), ~~27~~ 24 bytes
```
\d+
$*
+`1:
:60$*
6000`1
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7wPyZFm0tFi0s7wdCKy8rMAMg0MzAwSDD8/9/QwMrYgMvAEEwaWJmZgdiWllwGRlbGllyWlkA2AA "Retina 0.8.2 – Try It Online")
**Explanation**
I'll use the input `01:30` as an example.
```
\d+
$*
```
Convert minutes and seconds to unary. For example, `01:30` would become `1:111111111111111111111111111111`.
```
+`1:
:60$*
```
Loop over each digit preceding the `:`, move it to the right of the `:`, and repeat the digit 60 times. The `01:30` example would now be `:1111111111111111111...` (90 ones)
```
6000`1
```
Count the first 6000 ones. 
[Answer]
# JavaScript (ES6), 42 bytes
```
s=>Math.min(6e3,+([m]=s.split`:`)[1]+m*60)
```
[Try it online!](https://tio.run/##fcvRCoIwFADQd79CfNqy9C7pwh2sP@gLRHDYzMXcpEm/v16EIKHnw3nqt47Dyy7ryYe7SaNKUV1vep2q2XqGpjmWrJ07Fau4OLv2suet6Mr5gMDTEHwMzlQuPNjIChCygYLzvK5zguxXQSJuipjtL9Gm4kI7PsvmDxN9NwJA@gA "JavaScript (Node.js) – Try It Online")
### Commented
```
s =>               // s = input string
  Math.min(        // return the minimum of ...
    6e3,           //   ... 6000 and the following result ...
    +(             //   coerce to integer:
      [m] =        //     store into m the number of minutes
        s.split`:` //     which is the first term of the array obtained
                   //     by splitting s on ':'
    )[1] +         //   yield the seconds (2nd term of the above array)
    m * 60         //   and add the seconds multiplied by 60
  )                // end of Math.min()
```
[Answer]
# Google Sheets, ~~32~~ 16 bytes
*Saved 16 bytes thanks to Chronocidal straight up commenting a better answer.*
```
=240*MIN(25,6*A1
```
Sheets will automatically add two trailing parentheses when you exit the cell. Input is in `A1`.
---
This could also be written as `Min(6000,86400*TimeValue("0:"&A1))` if we wanted to fully expand it and be precise. As it is, we take advantage of the fact that Sheets will interpret a string that looks like a time to be in the format `hh:mm` by default and treat it as a number of days. For instance, `=1*"12:00"` would return `0.5` and `=1*"6:00"` would return `0.25`. We can then divide by 60 to convert from `hh:mm` to `mm:ss`. If that's the only simplification we used, it would look like this:
```
=Min(6000,1440*A1
```
Dividing both `6000` and `1440` by 240 saves us 5 bytes inside the `Min()` function at a cost of only 4 bytes outside of it.
[![enter image description here](https://i.stack.imgur.com/CFDGV.png)](https://i.stack.imgur.com/CFDGV.png)
[Answer]
# [J](http://jsoftware.com/), 21 19 bytes
```
6e3<.60#.[:".' '2}]
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/zVKNbfTMDJT1oq2AihTUjWpj/2typSZn5CtYGijYKqQpqBsYWhkbqEPEzMygYgZWZmZQMUNTS7hCS0sMQSMrY5igmYEB1ExLS5DS/wA "J – Try It Online")
* `[:".' '2}]` Convert the `:` to a space, then evaluate the string as a list of numbers.
* `60#.` Interpret result in base 60.
* `6e3<.` Minimum of that and 6000.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~61~~ 50 bytes
Saved a whopping 11 bytes thanks to [dingledooper](https://codegolf.stackexchange.com/users/88546/dingledooper)!!! 
```
s;f(char*t){s=atoi(t)*60+atoi(t+3);s=s<6e3?s:6e3;}
```
[Try it online!](https://tio.run/##TU/RaoMwFH3vV1wChaRaFmsXiGm2h7GvqD5IGjeFafHmQSZ@u4uplgVyOTf35JxzzfHLmHlGVVHzXfYHx0bUpetq6thB8OgBo5Qp1HgRNn3HzFc1zT9l3VIG4w78CX/BWXR4LfRIeJKlnMRAOM@ECCDJpAzglKUBSLm8TCoI1K0DO9ytcfa2KEgegxAxJK9yLYJzvpIfbn1wyofPUz7ID3@Dz7/@vIlXXQ90cWg0V80F61/bVTSkZS9rFzSZiqJm22mLhaBhZV@bgqnn8N77cUVJTvaYEzi@wf4GHrY@x0aPAWOf9LlaU2iNm8i0m@Y/ "C (gcc) – Try It Online")
[Answer]
# perl -MList::Util=min -plF: -E, 25 bytes
```
$_=min 60*$F[0]+$F[1],6E3
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3jY3M0/BzEBLxS3aIFYbSBrG6pi5Gv//b2BoZWzAZWBgZWbGBWRbWnIZGFkZW3JZWgLZ//ILSjLz84r/6/r6ZBaXWFmFlmTmgIwCCpjqGRga/NctyHGzAgA "Perl 5 – Try It Online")
[Answer]
## Batch, 55 bytes
```
@set/ps=
@cmd/cset/a"(s=%s::=*60+%)+(s-=6000)*(-s>>13)
```
Takes input on STDIN. Explanation: `%s::=*60+%` substitutes `*60+` for the `:` in the input, resulting in an arithmetic expression that converts the time into seconds. Since Batch has no minimum function, I then have to compute this via right-shifting the the difference which results in `0` or `-1` which is then used to adjust the seconds, which are then automatically output thanks to the use of `cmd/c`.
[Answer]
# [Python 3](https://docs.python.org/3/), ~~82~~ ~~72~~ ~~62~~ ~~61~~ 57 bytes
```
def f(s):x,y=map(int,s.split(":"));return min(x*60+y,6e3)
```
[Try it online!](https://tio.run/##rYtRCgIhEED/5xTLfs2UxJQgaHSYICWhtUFnYT29eYj@Ho/3pOv7W@wYr5iWhI3CYfpjewrmoqZdmnyy4hpWonuNuteybLngcXJ87sZFS0PqTDHNQXZFIoI/mcHXYBmYg3Mw2XvgW7AevJ/8Aw "Python 3 – Try It Online")
* -10 bytes by using `min()`.
* -10 bytes from Arnauld!
* -1 byte from nope!
* -4 bytes from Chas Brown!
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 12 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
Feel like I'm missing a trick here ...
```
q': ì60 m6e3
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=cSc6IOw2MCBtNmUz&input=IjAxOjk5Ig)
```
q': ì60 m6e3     :Implicit input of string
q':              :Split on ":"
    ì60          :Convert to integer from base-60 digit array
        m6e3     :Minimum with 6000
```
[Answer]
# [MathGolf](https://tio.run/##y00syUjPz0n7/9/IJvPR1PlaOUZ2mdpmj2au0no0dfL//0oGhlbGBkpcSgYGVmZmINrQytISRBtZGYNoS0sQHwA), 14 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
2<i╟*l2>i+6♪*╓
```
[Try it online.](https://tio.run/##y00syUjPz0n7/9/IJvPR1PlaOUZ2mdpmj2au0no0dfL//0oGhlbGBkpcSgYGVmZmINrQytISRBtZGYNoS0sQHwA)
**Explanation:**
```
                #  i.e. input = "99:80"
2<              # Take the first two characters of the (implicit) input-string
                #  STACK: ["99"]
  i             # Convert it from string to integer
                #  STACK: [99]
   ╟*           # Multiply it by 60
                #  STACK: [5940]
     l          # Push the input-string again
                #  STACK: [5940,"99:80"]
      2>i       # Leave its last two characters, and also cast it to an integer
                #  STACK: [5940,80]
         +      # Add them together
                #  STACK: [6020]
          6♪*   # Push 6*1000: 6000
                #  STACK: [6020,6000]
             ╓  # Only leave the smallest value of the top two values on the stack
                #  STACK: [6000]
                # (after which the entire stack joined together is output implicitly)
```
[Answer]
# [Whitespace](https://web.archive.org/web/20150618184706/http://compsoc.dur.ac.uk/whitespace/tutorial.php), 167 bytes
```
[S S S T    S T T   T   S T T   T   S S S S N
_Push_6000][S N
S _Duplicate_6000][S N
S _Duplicate_6000][S N
S _Duplicate_6000][T    N
T   S _Read_STDIN_as_char][T    T   T   _Retrieve][S S S T  T   S S S S N
_Push_48][T S S T   _Subtract][S S S T  S S T   S T T   S S S N
_Push_600][T    S S N
_Multiply][S N
S _Duplicate][S N
S _Duplicate][T N
T   S _Read_STDIN_as_character][T   T   T   _Retrieve][S S S T  T   S S S S N
_Push_48][T S S T   _Subtract][S S S T  T   T   T   S S N
_Push_60][T S S N
_Multiply][T    S S S _Add][S N
S _Duplicate][T N
T   S _Read_STDIN_as_character][S N
S _Duplicate][S N
S _Duplicate][T N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve][T    S S S _Add][S N
T   _Swap_top_two][T    S S T   _Subtract][S N
S _Duplicate][N
T   T   N
_If_negative_jump_to_Label_PRINT][S N
S _Duplicate][T S S T   _Subtract][N
S S N
_Create_Label_PRINT][T  S S S _Add][T   N
S T _Print_as_integer]
```
Letters `S` (space), `T` (tab), and `N` (new-line) added as highlighting only.  
`[..._some_action]` added as explanation only.
[Try it online](https://tio.run/##hU1LCoBQCFyPp/ASLew2EQ9qFxR0fJ/ftqkDOs7oe5zPuK9tH6rMDAYSFmSZBWqyNnBpAEk5Qz/iIKnQys8D9FuEgbzxkz5RmayBqsi6yAQ) (with raw spaces, tabs and new-lines only).
**Explanation in pseudo-code:**
Unfortunately Whitespace is unable to read an integer when there is anything other than a newline (or nothing) behind it. Because of this, the minute-digits has to be read loose as characters, and seconds can be read as an integer..
```
Integer m1 = Read STDIN as character
m1 = m1 - 48
m1 = m1 * 600
Integer m2 = Read STDIN as character
m2 = m2 - 48
m2 = m2 * 60
Integer m = m1 + m2
Read STDIN as character (the ':', which we simply ignore)
Integer s = Read STDIN as integer
Integer total_seconds = m + s
If(total_seconds - 6000 < 0):
  Print total_seconds as integer to STDOUT
Else:
  Print 6000 as integer to STDOUT
```
[Answer]
# Befunge-93, 35 bytes
```
&~$"<"*&+:v
v!`*"<""d"<
_"d""<"*.@.
```
[Try it online!](https://tio.run/##S0pNK81LT/3/X61ORclGSUtN26qMq0wxQQvIUUpRsuGKB5IgCT0Hvf//DQytLC0B "Befunge-93 – Try It Online")
Reads a number, read a character (`:`) and discard it, multiply the read number with 60 (ASCII character 60 equals `"<"`), read the second number, and add it to the product (this gives the number of seconds). Dub the number of seconds; push 6000 (`6000 = 60 * 100 = "<" * "d"`) on the stack and compare. If 6000 is less than the number of seconds, push another 6000 on the stack and print it. Else, print the number of seconds (which is now the top of the stack).
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ṣ”:Vḅ60«6ȷ
```
A monadic Link accepting a list of characters which yields an integer.
**[Try it online!](https://tio.run/##ASEA3v9qZWxsef//4bmj4oCdOlbhuIU2MMKrNsi3////OTk6OTk "Jelly – Try It Online")**
### How?
```
ṣ”:Vḅ60«6ȷ - Link: list of characters, T
 ”:        - character ':'
ṣ          - split T at ':'
   V       - evaluate as Jelly code -> [m,s]
     60    - sixty
    ḅ      - convert from base -> 60*m+s
        6ȷ - 6*10^3 = 6000
       «   - minimum
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 41 bytes
```
->i{[i[0,2].to_i*60+i[3,2].to_i,6e3].min}
```
[Try it online!](https://tio.run/##KypNqvyfZqvwX9cuszo6M9pAxyhWryQ/PlPLzEA7M9oYxtUxSzWO1cvNzKv9X6CQFq1kYGhlbKAUaw3hGFiZmcE5hlaWlnCOkZUxnGNpCZb5DwA "Ruby – Try It Online")
16 bytes saved thanks to [math-junkie](https://codegolf.stackexchange.com/users/65425/math-junkie)
[Answer]
# [C++ (gcc)](https://gcc.gnu.org/), 92 bytes
```
#import<iostream>
main(){int m,s;char x;std::cin>>m>>x>>s;std::cout<<std::min(m*60+s,6000);}
```
[Try it online!](https://tio.run/##Sy4o0E1PTv7/XzkztyC/qMQmM7@4pCg1MdeOKzcxM09Dszozr0QhV6fYOjkjsUihwrq4JMXKKjkzz84u186uws6uGCqSX1piYwNm5gK15WqZGWgX65gZGBhoWtf@/29paWVpCQA "C++ (gcc) – Try It Online")
Special Thanks to [math junkie](https://codegolf.stackexchange.com/users/65425/math-junkie).
Special Thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat) for the educative suggestion.
[Answer]
# x86-16 machine code, 30 bytes
Binary:
```
00000000: 33d2 e806 00b2 3cf6 e292 acad 2d30 3086  3.....<.....-00.
00000010: c4d5 0a03 c2ba 7017 3bc2 7e01 92c3       ......p.;.~...
```
Listing:
```
33 D2           XOR  DX, DX         ; zero DX 
E8 0006         CALL CONV           ; get minutes into AX 
B2 3C           MOV  DL, 60         ; multiplier 60 sec/min  
F6 E2           MUL  DL             ; AX = AL * 60 
92              XCHG AX, DX         ; save seconds in DX 
AC              LODSB               ; skip ':' char 
            CONV:  
AD              LODSW               ; load next two ASCII chars into AX 
2D 3030         SUB  AX, '00'       ; ASCII convert 
86 C4           XCHG AL, AH         ; endian convert 
D5 0A           AAD                 ; BCD to byte convert
03 C2           ADD  AX, DX         ; add minutes to seconds
BA 1770         MOV  DX, 6000       ; set up max comparison
3B C2           CMP  AX, DX         ; is result > 6000?
7E 01           JLE  DONE           ; if not, return current value
92              XCHG AX, DX         ; otherwise 6000
            DONE:  
C3              RET                 ; return to caller
```
Input string in `[SI]`, output number of seconds in `AX`.
Sample I/O using test program:
[![enter image description here](https://i.stack.imgur.com/ZcP0e.png)](https://i.stack.imgur.com/ZcP0e.png)
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 13 bytes
```
Ｉ⌊⟦↨Ｉ⪪Ｓ:⁶⁰×⁶φ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5sbhEwzczLzO3NFcj2imxOBUiFFyQk1mi4ZlXUFoSXAJUma6hqaOgZKWkCaTMDIBESGZuarGGmY6CoYGBgWaspqam9f//BoZWxgb/dctyAA "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
      Ｓ         Input string
     ⪪ :        Split on literal `:`
    Ｉ           Cast each part to integer
   ↨    ⁶⁰      Convert from base 60
           ⁶    Literal 6
          ×     Multiplied by
            φ   Predefined variable 1000
 ⌊⟦             Take the minimum
Ｉ               Cast to string
                Implicitly print
```
[Answer]
# [Perl 5](https://www.perl.org/) with `-plF/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\d+)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))):(\d+)/ -MList::Util+sum,min`, 16 bytes
Not competing with [@Abigail's answer](https://codegolf.stackexchange.com/a/204981/9365) which is not 'cheaty' like this one.
```
$_=min 6e3,sum@F
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3jY3M0/BLNVYp7g018Ht/38DQytjAy4DAyszMy4g29KSy8DIytiSy9ISyP6XX1CSmZ9X/F@3IMdNX4MCEJOirUkBsAIboP9f19cns7jEyiq0JDNHG@gDHaBvAA "Perl 5 – Try It Online")
### Explanation
Using the `-F` flag, the left part of the input is replicated 60 times and the right part is extracted once, into `@F`. These are `sum`med to yield the number of seconds and we use `min` to ensure it's not over 6000.
[Answer]
## Tcl, 54 bytes
```
proc f {a} {scan $a %d:%d a b
expr min(60*$a+$b,6000)}
```
[Try it online!](https://tio.run/##JczRCoIwFMbx685TnEAhq4tjwuDsVcSL6bYSbA5dFIw9@zK7@fjBB/8wTDn7ZR7QYlQJ4zooh4XCUstSo8IezMcv@BzdSdC5UJeivwoiqlJ@P8bJYDy2Zra4Bj26bgvAwb/Ciq3F9m42/I8OUq5JNgRU70tSiJ@ZgW6yYWDezZL4Cw)
## Explanation
Sadly, the times with leading zeroes mess up string interpolation directly into expr (using ternaries) because Tcl thinks they are octal, so I had to settle for using scan to force interpretation as decimal. Also, if `6000.0` is allowed as output, I can save 1 byte.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 11 bytes
```
':¡60β6₄*)W
```
[Try it online!](https://tio.run/##yy9OTMpM/f9f3erQQjODc5vMHjW1aGmG//9vaGVpCQA "05AB1E – Try It Online")
Coincidental port of most answers.
## Explained
```
':¡60β6₄*)W
min(lhs: base10(number: split(string: input, character: ":"), from: 60), rhs: times(lhs: 6, rhs: 1000))
':  | Push the character ":"
¡   | Split the input upon ":"s -> [mins, seconds]
60β | Convert the list from base 60 to base 10
6₄* | Push the number `6000`
)W  | Wrap the converted input and 6000 into a list and find the smallest.
```
[Answer]
# [Rust](https://www.rust-lang.org/), 82 bytes
```
|s:&str|6000.min(60*s[..2].parse::<u32>().unwrap()+s[3..].parse::<u32>().unwrap())
```
[Try it online!](https://tio.run/##dY9BawMhEIXv/oppDkHbIGMCC2uaHPoTeg05LI2CdOMujpJDsr99qzZsT53DY3jvY56GRHG2Hq6d81zAnUGe3kSwcID5QXpNMTwaRJTXTDT4Sicpt2c5doGM1u9ptz1yIZO/hW7k4o1OOyn/jcW8rw2JDFC8aO0GrT@S/TTdZb9058T53L8Q1eDil7BDgN55A5mpgeyHr@9cUkxaPlFmDM7H3r/w1X1abcDydWH@XvO8OLGJzYgakRVVRVXdm6pty1DVVFVfFV9Vv22z/gA "Rust – Try It Online")
Unfortunately type inference for parse is very restricted and the turbofish must be used every time.
I also made some versions using `fold` instead of parse, but they are longer:
With a tuple accumulator and a closure to combine minutes and seconds:
```
|s:&[u8]|6000.min((|(a,b)|60*a+b)(s.iter().fold((0,0),|(a,b),x|match x{58=>(b,0),_=>(a,10*b+*x as i32-48)})))
```
Using a [i32;2] accumulator and `.iter().sum()`
```
|s:&[u8]|6000.min(s.iter().fold([0,0],|[a,b],x|match x{58=>[60*b,0],_=>[a,10*b+*x as i32-48]}).iter().sum())
```
And then there's this ungodly abomination using `std::ops::Range<i32>` as an accumulator, with `-60*minutes` as the start and `seconds` as the end. Eww.
```
|s:&[u8]|6000.min(s.iter().fold(0..0,|a,x|match x{58=>-60*a.end..0,_=>a.start..10*a.end+*x as i32-48}).len())
```
[Answer]
# APL+WIN, 20 bytes
Prompts for time as string:
```
6E3⌊60⊥(⍎2↑n),⍎3↓n←⎕
```
[Try it online! Courtesy of Dyalog Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcjzra0/6buRo/6ukyM3jUtVTjUW@f0aO2iXmaOkCW8aO2yXlAdUD1/4Eq/6dxqRsYWhkbqHOBWAZWZmYQlqGVpSWEZWRlDGIpcKlbWoIFAQ "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Burlesque](https://github.com/FMNSSun/Burlesque), 19 bytes
```
ps1RAp^60.*.+6000<.
```
[Try it online!](https://tio.run/##SyotykktLixN/f@/oNgwyLEgzsxAT0tP28zAwMBG7/9/A0MrS0sA "Burlesque – Try It Online")
Explanation:
```
ps                  # Parses input string as block: mm:ss => { mm ":" ss }
  1RA               # Removes element at index 1 from block: { mm ss }
     p^             # Splits block to stack
       60.*         # Multiply top element by 60
           .+       # Sum both elements
             6000<. # Return the minimum of the calculated value or 6000
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), 13 bytes
```
y6000B60mrx":
```
[Try it online!](https://tio.run/##yygtzv7/v9LMwMDAycwgt6hCyer///9KBkZWxpZKAA "Husk – Try It Online")
## Explanation
```
          x":    Split on colons
        mr       Convert from string form
     B60         Interpret in base 60
y6000            Minimum with 6000
```
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 17 bytes
```
q':/:i~\60*+6e3e<
```
[Try it online!](https://tio.run/##S85KzP3/v1DdSt8qsy7GzEBL2yzVONXm/39LSytLSwA "CJam – Try It Online")
```
q':/:i~\60*+6e3e<  e# Whole program
q                  e# Read input          [e.g "99:98"]
 ':/               e# Split on :          [e.g ["99" "98"]]
    :i             e# Convert to integers [e.g [99 98]]
      ~\           e# Dump and swap       [e.g 98 99]
        60*        e# Multiply by 60      [e.g 98 5940]
           +       e# Add                 [e.g 6038]
            6e3e<  e# Get minimum to 6000 [e.g 6000]
                   e# Implicit output
```
[Answer]
# [Befunge-93 (FBBI)](https://github.com/catseye/FBBI), 25 bytes
```
"<|`*"<d":+&*&
@.<
*"<d@.
```
[Try it online!](https://tio.run/##S0pNK81LT9W1NNZNS0rK/P9fyaYmQUvJJkXJSltNS43LQc@GC8R10Pv/39LSytISAA "Befunge-93 (FBBI) – Try It Online")
### Explanation:
The program consists of three parts (lines), the first one processes the input:
```
"<|`*"<d":+&*&    Stack                              IP direction
                  empty                              east
"<|`*"          push everything between the two quotes
                  42, 96, 124, 60                    east
      <         turn west
                  42, 96, 124, 60                    west
"<|`*"          push everything between the two quotes
                  60, 124, 96, 42, 42, 96, 124, 60   west
            *&  take an integer (minutes), convert to seconds
                  60*m, 124, ...                     west
          +&    take the next int, add to the total
                  60*m+s, 124, ...                   west
         :      duplicate TOS
                  60*m+s, 60*m+s, ...                west
    *"<d"       push 60*100 = 1000
                  6000, 60*m+s, 60*m+s, ...          west
   `            is greater than?
                  6000 > 60*m+s, 60*m+s, ...         west
  |             north-south if
                  60*m+s, ...                        north / south
```
If the total number of seconds is smaller or equal to 6000, the IP moves south and enters the second line: 
```
@.<               Stack                              IP direction
                  60*m+s, ...                        south
  <             turn west
                  60*m+s, ...                        west
 .              print integer
                  124, ...                           west
@               Stop
```
If the number of second is greater than 6000, the IP moves north and enters the last line:
```
*"<d@.            Stack                              IP direction
                  60*m+s, ...                        north
  <             turn west
                  60*m+s, ...                        west
*"              push everything up to the next quote ...
 "<d@.          ... which is actually the same one.
                  60, 100, 64, ...                   west
*               Stop
                  6000, 64, ...                      west
     .          print 6000
                  64, ...                            west
    @           Stop
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~16~~ 15 bytes
```
hS,6000ivcQ\:60
```
[Try it online!](https://tio.run/##K6gsyfj/PyNYx8zAwCCzLDkwxsrM4P9/JUtLIK0EAA "Pyth – Try It Online")
```
hS,6000ivcQ\:60   Implicit: Q=input()
         cQ\:     Split Q on ":"
        v         Convert each from string to integer
       i     60   Convert from base 60
  ,6000           Pair with 6000
 S                Sort
h                 Take the first element (i.e. smallest)
                  Implicit print
```
*Edit: Previous version:* `hS,6000isMcQ\:60`
[Answer]
# [Julia](https://docs.julialang.org/en/v1/) ~~54~~ ~~53~~ 52 bytes
```
f(x)=((i,j)=parse.(Int,split(x,":"));min(60i+j,6e3))
```
[try it online](https://tio.run/##tchRCsMgDADQ/xyjXwmVkVYQ4ugBdgxhFiJOxDrw9q6X2N/jpW/WsI05Txx0IKpJdNTQrvjAV@nmqlk7DrP4hej50YKOdU3GRUs0a9PSc8ETWwzvrCUiEcEfe/LmLQOzdw5uiwDv3gqI3P4B)
A single line solution for Julia.
A couple neat tricks here, we use `f(x)=`, a generic function declaration so we don't have to use the `return` `end` or `function` keywords.
We then use a compound expression like this `(code;code;...)`.
Unfortunately, when using tuple destructuring `i,j=`, the tuple here must be wrapped in parenthesis for some reason, which adds two bytes.
Edits:
* 1 byte improvement using `60i` instead of `60*i`
* 1 byte improvement by removing trailing whitespace
]