public function __construct($events)
public function __construct($events)
Parameters
array | $events |
Return
this | //Implicit.// |
public function getTimeSpentOnObject($phid, $now)
public function getTimeSpentOnObject($phid, $now)
Parameters
$phid | ||
$now |
Return
wild |
public function getObjectTimeRanges()
public function getObjectTimeRanges()
Return
wild |
public function getCurrentWorkStack($now, $include_inactive)
public function getCurrentWorkStack($now, $include_inactive)
Returns the current list of work.
Parameters
$now | ||
$include_inactive |
Return
wild |
public static function mergeTimeRanges($ranges)
public static function mergeTimeRanges($ranges)
Merge a list of time ranges (pairs of <start, end> epochs) so that no elements overlap. For example, the ranges:
array( array(50, 150), array(100, 175), );
...are merged to:
array( array(50, 175), );
This is used to avoid double-counting time on objects which had timers started multiple times.
Parameters
list<pair<int, | $ranges | int>> List of possibly overlapping time ranges. |
Return
list<pair<int, int>> | Nonoverlapping time ranges. |
public static function sortTimeline($u, $v)
public static function sortTimeline($u, $v)
Sort events in timeline order. Notably, for events which occur on the same second, we want to process end events after start events.
Parameters
array | $u | |
array | $v |
Return
wild |