Jump to content
Sign in to follow this  

btnRunFunction execution time

Recommended Posts

Func btnRunFunction()
    Local $currentRunState = $g_bRunState
    $g_bRunState = True

    Local $sFunc = GUICtrlRead($g_hTxtRunFunction)
    SetLog("Run Function : " & $sFunc, $COLOR_INFO)

    Local $hTimer = TimerInit() ; Begin the timer and store the handle in a variable.
    Local $saExecResult = Execute($sFunc)
    Setlog("Time Execution : " & TimerDiff($hTimer), $COLOR_INFO)
    If $saExecResult = "" And @error <> 0 Then
        Setlog("Result : Error", $COLOR_ERROR)
    ElseIf IsArray($saExecResult) Then
        Setlog("Result (IsArray) : " & _ArrayToString($saExecResult, ","), $COLOR_INFO)
        _ArrayDisplay($saExecResult, "Debug Func. Result")
        Setlog("Result : " & $saExecResult, $COLOR_INFO)

    $g_bRunState = $currentRunState

@Chilly-ChillThis function is ideal to measure which option is faster, since it adds a timer to btnRunFunction, with humility I would like it to be added to MyBot.run, since it is very easy to implement and maybe it will serve.



Edited by Boldina

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...