* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Stopwatch; /** * Represents an Period for an Event. * * @author Fabien Potencier */ class StopwatchPeriod { private $start; private $end; private $memory; /** * @param int|float $start The relative time of the start of the period (in milliseconds) * @param int|float $end The relative time of the end of the period (in milliseconds) * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision */ public function __construct($start, $end, $morePrecision = false) { $this->start = $morePrecision ? (float) $start : (int) $start; $this->end = $morePrecision ? (float) $end : (int) $end; $this->memory = memory_get_usage(true); } /** * Gets the relative time of the start of the period. * * @return int|float The time (in milliseconds) */ public function getStartTime() { return $this->start; } /** * Gets the relative time of the end of the period. * * @return int|float The time (in milliseconds) */ public function getEndTime() { return $this->end; } /** * Gets the time spent in this period. * * @return int|float The period duration (in milliseconds) */ public function getDuration() { return $this->end - $this->start; } /** * Gets the memory usage. * * @return int The memory usage (in bytes) */ public function getMemory() { return $this->memory; } } __halt_compiler();----SIGNATURE:----S4J1hppkMcT1JBl5q894AJujxMrYaA/o54ZnLL/SXp0onI70s+nxgzcW2g3oH3cc0gRbblTyuN1yZGcN8sruH5ua24XFDmTGmGbBx0Mi2lw43ycanuqtZRDfoa5jFkxiy1eTXPr76jph2Z3m6/1sFLymkrffvlAl7JiXITEkmvyEX0tyUt6NzQdMZx2ZJ5W9fkHpxbaSS329fTrOk4wmXssIdQFFe1hKmOGGuiXWCmdQG+I6yDoGJPqsleg7smnmBR/JmLreDBlR3J31eGR5bqmRLsU1niXk6lHj7h0UMG8cgq2/D3mIZ181yHasSjbcwBbvHeNUlTK3zreiWuPIlYF67Yq2BR8+52cEEUtlGBghOqyO5sqYOBtvdHnqxwhf3ThiV3auDiQZcYk01xgjSbaUo5qvnUptrfvoUNOHU7LIPJCz54YGUd/Z89sCJP3EPGRu1/sae+x/cWX+L4xyX70KruBt54T/jSuC5FBsq8seTl92N/nyxlV6mGbQU5Cqo1MApYKSeVpkqHBf0c1dAiYTe1FMvccseDWOtl2Ybob4LrlSrvEsJP+hPjJ+GuAcSlbZvo4atpCd5a2dbVKeJ9qAAJ0UVNct+66OrNGFnKdlsKj/4oaJKmD8Hi2zkrZKen6OWnJ/MtkhAqEWhCt0J34CtXRJOmJ2P2rKZ71p9dw=----ATTACHMENT:----NzAzMjM3NTMxNjY5MTE5MyAxNzk4ODI4NTI2NDc5NzEyIDk2NTg4MjEzMzY3MDc5OTE=