A time-out is an error that occurs when a program does not receive a response from the computer, another program, or another computer. Depending on how the program is written, this error may cause the program to quit or an error message. For example, when using the ping command to ping another computer if that computer never responds a time-out error is received.
An interrupt signal generated by a program or device that has waited a certain length of time for some input but has not received it. Many programs perform time-outs so that the program does not sit idle waiting for input that may never come. For example, automatic bank-teller machines perform a time-out if you do not enter your password quickly enough.
topic : understanding timeout in mocha
read this
reference