PHP time limit management.
Copyright: | 2013 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 113 lines (4 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_php_time_limit:: (2 methods):
raise()
get_and_clear_unit_test_data()
Class: core_php_time_limit - X-Ref
Utility class to manage PHP time limit.raise($newlimit = 0) X-Ref |
Sets the PHP time limit to a number of seconds from now. This function will always extend the time limit (in other words, if the time limit has already been set further in the future, it will do nothing). In order to support front-end servers which may time out silently if no output is displayed, you should ideally only call this function if you expect some output to be displayed at the same time. (I.e. if you call this function each time around a loop, also display some output each time around the loop, such as a progress bar update.) param: int $newlimit Limit in seconds from now (0 = infinite) |
get_and_clear_unit_test_data() X-Ref |
For unit testing, returns an array of the values set during test. return: array Array of values set |