3 declare(strict_types=1);
    46         $this->expectException(\RuntimeException::class);
    47         $this->expectExceptionMessage(
"Execution of callback exceeded the given duration and could not be stretched.");
    56         $start_time = microtime(
true);
    58         $end_time = microtime(
true);
    60         $elapsed_time = ($end_time - $start_time); 
    61         $expected_duration_in_us = (0.002);
    63         $this->assertGreaterThanOrEqual($expected_duration_in_us, ($end_time - $start_time));
    68         return static function () use ($duration_in_ms, $should_halt) {
    69             usleep(1_000 * $duration_in_ms);
 testCallbackStretchingWithTooLongExecutionTime()
 
getTestCallbackWithLength(int $duration_in_ms, bool $should_halt=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...