# ForDuration(long)

> After specified duration, the item will be automatically unscheduled.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.6/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
IVisualElementScheduledItem ForDuration(long durationMs)
```

### Parameters

**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): The total duration in milliseconds where this item will be active.

### Returns

| Type                                                                                                                 | Description         |
| -------------------------------------------------------------------------------------------------------------------- | ------------------- |
| [IVisualElementScheduledItem](/engine/6000.6/script-reference/unityengine/uielements/ivisualelementscheduleditem.md) | This ScheduledItem. |
