Page MenuHomePhabricator

final class PhrequentTimeBlock
Phabricator Technical Documentation (Phrequent)

This class is not documented.

Methods

public function __construct($events)

This method is not documented.
Parameters
array$events
Return
this//Implicit.//

public function getTimeSpentOnObject($phid, $now)

This method is not documented.
Parameters
$phid
$now
Return
wild

public function getObjectTimeRanges()

This method is not documented.
Return
wild

public function getCurrentWorkStack($now, $include_inactive)

Returns the current list of work.

Parameters
$now
$include_inactive
Return
wild

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,$rangesint>> List of possibly overlapping time ranges.
Return
list<pair<int, int>>Nonoverlapping time ranges.

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