class Timeval
More...
|
static | compare ($a_obj, $b_obj) |
| Return negative, 0, or positive according to whether a < b, a == b, or a > b respectively. More...
|
|
static | similar ($a_obj, $b_obj, $thresh_obj) |
| Checks whether the two times are within $threshold of each other. More...
|
|
static | now () |
| Returns the current time as a timeval object. More...
|
|
static | zero () |
| Returns the zero time interval as a timeval object. More...
|
|
static | infFuture () |
| Returns the infinite future time value as a timeval object. More...
|
|
static | infPast () |
| Returns the infinite past time value as a timeval object. More...
|
|
◆ __construct()
Grpc\Timeval::__construct |
( |
|
$microseconds | ) |
|
Constructs a new instance of the Timeval class.
- Parameters
-
number | $microseconds | The number of microseconds in the interval |
◆ add()
Grpc\Timeval::add |
( |
|
$other_obj | ) |
|
Adds another Timeval to this one and returns the sum.
Calculations saturate at infinities.
- Parameters
-
- Returns
- Timeval A new Timeval object containing the sum
◆ compare()
static Grpc\Timeval::compare |
( |
|
$a_obj, |
|
|
|
$b_obj |
|
) |
| |
|
static |
Return negative, 0, or positive according to whether a < b, a == b, or a > b respectively.
- Parameters
-
Timeval | $a_obj | The first time to compare |
Timeval | $b_obj | The second time to compare |
- Returns
- long
◆ infFuture()
static Grpc\Timeval::infFuture |
( |
| ) |
|
|
static |
Returns the infinite future time value as a timeval object.
- Returns
- Timeval Infinite future time value
◆ infPast()
static Grpc\Timeval::infPast |
( |
| ) |
|
|
static |
Returns the infinite past time value as a timeval object.
- Returns
- Timeval Infinite past time value
◆ now()
static Grpc\Timeval::now |
( |
| ) |
|
|
static |
Returns the current time as a timeval object.
- Returns
- Timeval The current time
◆ similar()
static Grpc\Timeval::similar |
( |
|
$a_obj, |
|
|
|
$b_obj, |
|
|
|
$thresh_obj |
|
) |
| |
|
static |
Checks whether the two times are within $threshold of each other.
- Parameters
-
Timeval | $a_obj | The first time to compare |
Timeval | $b_obj | The second time to compare |
Timeval | $thresh_obj | The threshold to check against |
- Returns
- bool True if $a and $b are within $threshold, False otherwise
◆ sleepUntil()
Grpc\Timeval::sleepUntil |
( |
| ) |
|
Sleep until this time, interpreted as an absolute timeout.
- Returns
- void
◆ subtract()
Grpc\Timeval::subtract |
( |
|
$other_obj | ) |
|
Subtracts another Timeval from this one and returns the difference.
Calculations saturate at infinities.
- Parameters
-
- Returns
- Timeval A new Timeval object containing the diff
◆ zero()
static Grpc\Timeval::zero |
( |
| ) |
|
|
static |
Returns the zero time interval as a timeval object.
- Returns
- Timeval Zero length time interval
The documentation for this class was generated from the following file: