MediaWiki master
TimeRange.php
Go to the documentation of this file.
1<?php
2
3namespace Wikimedia\WRStats;
4
10class TimeRange {
12 public $start;
14 public $end;
15
22 public function __construct( $start, $end ) {
23 $this->start = $start;
24 $this->end = $end;
25 }
26
32 public function getDuration() {
33 return $this->end - $this->start;
34 }
35}
__construct( $start, $end)
Definition TimeRange.php:22
getDuration()
Get the duration of the time range in seconds.
Definition TimeRange.php:32
float int $start
UNIX start time.
Definition TimeRange.php:12
float int $end
UNIX end time.
Definition TimeRange.php:14