# IGrainTimer Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igraintimer/)

## Change(TimeSpan, TimeSpan) {#change-system-timespan-system-timespan-20140932}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igraintimer/methods/change-system-timespan-system-timespan-20140932/)

```csharp
public abstract void Change(TimeSpan dueTime, TimeSpan period)
```

Changes the start time and the interval between method invocations for a timer, using `System.TimeSpan` values to measure time intervals.

### Parameters

- `dueTime` (`TimeSpan`): A `System.TimeSpan` representing the amount of time to delay before invoking the callback method specified when the [IGrainTimer](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igraintimer/) was constructed. Specify `System.Threading.Timeout.InfiniteTimeSpan` to prevent the timer from restarting. Specify `System.TimeSpan.Zero` to restart the timer immediately.
- `period` (`TimeSpan`): The time interval between invocations of the callback method specified when the timer was constructed. Specify `System.Threading.Timeout.InfiniteTimeSpan` to disable periodic signaling.

### Exceptions

- `System.ArgumentOutOfRangeException`: The `dueTime` or `period` parameter, in milliseconds, is less than -1 or greater than 4294967294.
