Forum Discussion
Lee_Sutcliffe
Aug 22, 2017Nacreous
You shouldn't be using global variables as this will demote your CMP to one CPU. Also, as you are setting the variable in RULE_INIT and CLIENT_ACCEPTED, the set command in CLIENT_ACCEPTED will overwrite the variable in RULE_INIT. This means the set in RULE_INIT is redundant. That being the case, you could just remove the RULE_INIT event and edit CLIENT_ACCEPTED so that it sets 'timestart' as a local variable
set timestart [clock seconds]