Menu

## InteractsWithTime

InteractsWithTime.php : 11

### Table of Contents

#### Methods

availableAt() : int
  Get the "available at" UNIX timestamp.
currentTime() : int
  Get the current system time as a UNIX timestamp.
parseDateInterval() : DateInterval|DateTimeInterface|int
  If the given value is an interval, convert it to a DateTime instance.
runTimeForHumans() : string
  Given a start time, format the total run time for human readability.
secondsUntil() : int
  Get the number of seconds until the given DateTime.

### Methods

#### availableAt()

InteractsWithTime.php : 34

Get the "available at" UNIX timestamp.

`protected availableAt([DateInterval|DateTimeInterface|int $delay = 0 ]) : int`

##### Parameters

$delay : DateInterval|DateTimeInterface|int = 0

##### Return values

int

#### currentTime()

InteractsWithTime.php : 63

Get the current system time as a UNIX timestamp.

`protected currentTime() : int`

##### Return values

int

#### parseDateInterval()

InteractsWithTime.php : 49

If the given value is an interval, convert it to a DateTime instance.

`protected parseDateInterval(DateInterval|DateTimeInterface|int $delay) : DateInterval|DateTimeInterface|int`

##### Parameters

$delay : DateInterval|DateTimeInterface|int

##### Return values

DateInterval|DateTimeInterface|int

#### runTimeForHumans()

InteractsWithTime.php : 76

Given a start time, format the total run time for human readability.

`protected runTimeForHumans(float $startTime[, float|null $endTime = null ]) : string`

##### Parameters

$startTime : float
$endTime : float|null = null

##### Tags

throws
  Exception

##### Return values

string

#### secondsUntil()

InteractsWithTime.php : 19

Get the number of seconds until the given DateTime.

`protected secondsUntil(DateInterval|DateTimeInterface|int $delay) : int`

##### Parameters

$delay : DateInterval|DateTimeInterface|int

##### Return values

int

## Search results