@@IDLE function returns the time in milliseconds that SQL Server has been idle since last started.
Syntax of @@IDLE Function :
@@IDLE
Return type of an above function is an integer.
Examples of @@IDLE Function :
Example 1 : Use of @@IDLE function in select clause
Output
Above example returns 778089 milliseconds sql server has been idle.