# Function Reference

# _WinAPI_GetIdleTime

Retrieves the time that has elapsed since the last input

#include <WinAPISys.au3>
_WinAPI_GetIdleTime ( )

## Return Value

Success: | The elapsed time, in milliseconds.
Failure: | 0.

## See Also

Search GetLastInputInfo in MSDN Library.

## Example

    #include <WinAPISys.au3>

    For $i = 1 To 5
        ConsoleWrite('Idle time (ms): ' & _WinAPI_GetIdleTime() & @CRLF)
        Sleep(1000)
    Next