# CMxElapsedTime Class

Namespace: `ArchestrA.Toolkit`

CMxElapsedTime is derived from CMxCommon and provides support for Elapsed time/Timespan Attributes.

**Syntax**

```csharp
public class CMxElapsedTime : CMxCommon
```

## CMxElapsedTime Property

### Value Property

Provides a property to get and set the value as a TimeSpan.

**Syntax**

```csharp
public TimeSpan Value { get; set; }
```

**Returns**

TimeSpan

## CMxElapsedTime Constructors

### CMxElapsedTime Constructor

Provides a default constructor.

**Syntax**

```csharp
public CMxElapsedTime();
```

### CMxElapsedTime Constructor (TimeSpan)

Provides a constructor to initialize the class with a TimeSpan default value.

**Syntax**

```csharp
public CMxElapsedTime (TimeSpan v);
```

**Parameters**

**`v`**

[in] TimeSpan value to be set.

### CMxElapsedTime Constructor (string)

Provides a constructor to initialize the class with a formatted time string default value.

**Syntax**

```csharp
public CMxElapsedTime(string timeString);
```

**Parameters**

**`timeString`**

[in] string value that holds the time.

### CMxElapsedTime Constructor (SupportWrapper, string)

Provides a constructor that initializes the class for use in a primitive wrapper.

**Syntax**

```csharp
public CMxElapsedTime (SupportWrapper _wrapper, string _attributeRef);
```

**Parameters**

**`_wrapper`**

[in] SupportWrapper.

**`_attributeRef`**

[in] string value that holds the attribute reference.

## CMxElapsedTime Method

### Set Method

Sets the value of the Attribute from a CMxElapsedTime.

**Syntax**

```csharp
public void Set(CMxElapsedTime val);
```

**Parameters**

**`val`**

[in] CMxElapsedTime value to be set.

## CMxElapsedTime Operator Overloads

### CMxElapsedTime Operator Overload (TimeSpan)

Provides an operator to convert a MxDataType into a CMxElapsedTime.

**Syntax**

```csharp
public static implicit operator CMxElapsedTime(TimeSpan x);
```

**Parameters**

**`x`**

[in] TimeSpan value to convert to CMxElapsedTime.

**Returns**

CMxElapsedTime

### CMxValue Operator Overload

Provides an operator to convert a CMxElapsedTime into a CMxValue.

**Syntax**

```csharp
public static implicit operator CMxValue(CMxElapsedTime val);
```

**Parameters**

**`val`**

[in] CMxElapsedTime value to convert to CMxValue.

**Returns**

CMxValue

### TimeSpan Operator Overload

Provides an operator to convert a CMxElapsedTime into a MxDataType.

**Syntax**

```csharp
public static implicit operator TimeSpan (CMxElapsedTime val);
```

**Parameters**

**`val`**

[in] CMxElapsedTime value to convert to TimeSpan.

**Returns**

TimeSpan

### CMxElapsedTime Operator Overload (CMxValue)

Provides an operator to convert a CMxValue into a CMxElapsedTime.

**Syntax**

```csharp
public static implicit operator CMxElapsedTime (CMxValue val);
```

**Parameters**

**`val`**

[in] CMxValue value to convert to CMxElapsedTime.

**Returns**

CMxElapsedTime

### - Operator Overload (CMxElapsedTime)

Provides an operator to subtract a CMxElapsedTime from a CMxElapsedTime.

**Syntax**

```csharp
public static TimeSpan operator -(CMxElapsedTime t);
```

**Parameters**

**`t`**

[in] CMxElapsedTime value.

**Returns**

TimeSpan

### - Operator Overload (CMxElapsedTime, TimeSpan)

Provides an operator to subtract a TimeSpan from a CMxElapsedTime.

**Syntax**

```csharp
public static TimeSpan operator -(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

TimeSpan

### != Operator Overload

Provides an operator to compare a CMxElapsedtime with a TimeSpan.

**Syntax**

```csharp
public static bool operator !=(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

bool

### + Operator Overload (CMxElapsedTime)

Provides an operator to add a CMxElapsedTime to a TimeSpan.

**Syntax**

```csharp
public static TimeSpan operator +(CMxElapsedTime t);
```

**Parameters**

**`t`**

[in] CMxElapsedTime value.

**Returns**

TimeSpan

### + Operator Overload (CMxElapsedTime, TimeSpan)

Provides an operator to add a TimeSpan to a CMxElapsedTime.

**Syntax**

```csharp
public static TimeSpan operator +(CMxElapsedTime t, TimeSpan ts);
```

**Parameters**

**`t`**

[in] CMxElapsedTime value.

**`ts`**

[in] TimeSpan value.

**Returns**

TimeSpan

### < Operator Overload

Provides an operator to test if a CMxElapsedTime is less than a TimeSpan.

**Syntax**

```csharp
public static bool operator <(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan.

**Returns**

bool

### <= Operator Overload

Provides an operator to test if a CMxElapsedTime is less than or equal to a TimeSpan.

**Syntax**

```csharp
public static bool operator <=(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

bool

### == Operator Overload

Provides an operator to test if a CMxElapsedTime and a TimeSpan are equal.

**Syntax**

```csharp
public static bool operator ==(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

bool

### > Operator Overload

Provides an operator to test if a CMxElapsedTime is greater than a TimeSpan.

**Syntax**

```csharp
public static bool operator >(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

bool

### >= Operator Overload

Provides an operator to test if a CMxElapsedTime is greater than or equal to a TimeSpan.

**Syntax**

```csharp
public static bool operator >=(CMxElapsedTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxElapsedTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

bool
