﻿#include <GUIConstantsEx.au3>
Global $hGui = GUICreate('MessageLoop-Modus', 400, 300)
GUICtrlCreateLabel('RPS:', 10, 10, 40, 25)
Global $idRPS = GUICtrlCreateLabel('-1', 50, 10, 180, 25)
Global $idLabel = GUICtrlCreateLabel('0', 10, 50, 380, 25)
Global $idInput = GUICtrlCreateInput('0', 10, 100, 380, 25)
GUISetState()
Global $iCount = 0, $iRPS = 0
AdlibRegister('_RoundsPerSec', 1000)
While True
	If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
	$iCount += 1
	$iRPS += 1
	GUICtrlSetData($idLabel, $iCount)
WEnd

Func _RoundsPerSec()
	GUICtrlSetData($idRPS, $iRPS)
	$iRPS = 0
EndFunc
