duration = $duration; } /** * Set the event duration. * * @param float $duration Event duration. */ public function set_duration( $duration ) { $this->duration = $duration; } /** * Get the event duration. * * @return float */ public function get_duration() { return $this->duration; } /** * Get the server timing header string. * * @return string Server timing header string representing this event. */ public function get_header_string() { return sprintf( '%s;dur="%.1f"', parent::get_header_string(), $this->get_duration() ); } }