rcmaehl Posted November 12, 2021 Share Posted November 12, 2021 (edited) 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 November 12, 2021 by rcmaehl TheDcoder 1 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 WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
pseakins Posted November 12, 2021 Share Posted November 12, 2021 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") TheDcoder and Gianni 2 Phil Seakins Link to comment Share on other sites More sharing options...
rcmaehl Posted November 12, 2021 Author Share Posted November 12, 2021 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 WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Solution JockoDundee Posted November 12, 2021 Solution Share Posted November 12, 2021 This topic discussed to the fullest extent of the law here: TheDcoder and Musashi 2 Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
mikell Posted November 12, 2021 Share Posted November 12, 2021 Quote The 250ms thing is a mirage, ... and one year later the mirage line still exists in the helpfile TheDcoder and rcmaehl 2 Link to comment Share on other sites More sharing options...
pseakins Posted November 12, 2021 Share Posted November 12, 2021 (edited) <snip> Edited November 13, 2021 by pseakins Response was not relevant to OP's query. Phil Seakins Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now