System.TimeSpan.TTimeSpan.Add

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Add(const TS: TTimeSpan): TTimeSpan; overload;

C++

TTimeSpan __fastcall Add(const TTimeSpan &TS)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.TimeSpan.pas
System.TimeSpan.hpp
System.TimeSpan TTimeSpan

Description

Adds the time span given through the parameter to the current time span.

The Add method returns a time span obtained by adding the number of ticks in the time span provided by the TS parameter to the number of ticks in the current TTimeSpan value. Add returns a new TTimeSpan instance. The time interval in the current instance (that Add belongs to) is not altered.

Add returns an overflow exception if the return value is outside the range specified by MinValue to MaxValue.

See Also