ashterix / control-time
Time control of the script with the ability to check the intermediate points.
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ashterix/control-time
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2023-01-31 11:28:27 UTC
README
Time control of the script with the ability to check the intermediate points.
How use?
INIT
At the beginning of your script, initiate control of time:
use Control\ControlTime; ControlTime::init(); ~~~~~ ##### ADD WAYPOINTS In the right places in your script, add waypoints with comments: ~~~~~~ php ControlTime::addWayPoint('Before connect to DB'); // your connect to DB ControlTime::addWayPoint('After connect to DB'); ~~~~~ ##### GET RESULTS At the end of your script, get results in the desired format: ~~~~~~ php $resultArray = ControlTime::getResults(ControlTime::RETURN_ARRAY); // or $resultJSON = ControlTime::getResults(ControlTime::RETURN_JSON); // or $resultHTML = ControlTime::getResults(ControlTime::RETURN_HTML); ~~~~~ ##### HTML demo: ~~~~~~ php echo $resultHTML; ~~~~~ 