Jump to content

ProcessExists() documentation question


rcmaehl
 Share

Go to solution Solved by JockoDundee,

Recommended Posts

Hi all,

Just wanted to verify something from the documentation for ProcessExists().

It notes that The process is polled approximately every 250 milliseconds.

Does this mean it can take up to 250ms for the function to realize a process exists or no longer exists? If so, does this limitation affect ProcessList() as well?
EDIT: In terms of how often the process list it checks against is updated, not the function execution time

Thanks in advance!

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

The documentation is obviously incorrect. It is only polled once per statement.

You can find out for yourself how long it takes by writing a simple test script. On my PC it is 7ms regardless of whether notepad is active or not.

 

$start = TimerInit()
For $i = 1 To 1000
$x =  ProcessExists("notepad.exe")
Next
ConsoleWrite("Per iteration = " & TimerDiff($start) / 1000 & " ms")

 

Phil Seakins

Link to comment
Share on other sites

7 hours ago, pseakins said:

The documentation is obviously incorrect. It is only polled once per statement.

You can find out for yourself how long it takes by writing a simple test script. On my PC it is 7ms regardless of whether notepad is active or not.

 

$start = TimerInit()
For $i = 1 To 1000
$x =  ProcessExists("notepad.exe")
Next
ConsoleWrite("Per iteration = " & TimerDiff($start) / 1000 & " ms")

 

Was referring to how often the process list it checks against is updated, not the execution time of the function.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

  • rcmaehl changed the title to ProcessExists() documentation question

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...