# IInbox.RegisterWakeup(Func&lt;TimeSpan?&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinbox/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinbox/methods/)

```csharp
public abstract IInbox RegisterWakeup(Func<TimeSpan?> getWakeupDelay)
```

Registers a callback which reports durable work held outside the inbox, such as messages which an [IInboxMessageSink](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxmessagesink/) accepted, so the messaging wake-up reactivates the grain while that work remains.

### Parameters

- `getWakeupDelay` (`Func<TimeSpan?>`): Returns `null` when no work is pending; otherwise, the longest acceptable delay before a deactivated grain is reactivated to resume the work. A delay of `System.TimeSpan.Zero` or less requests a prompt wake-up.

### Returns

This inbox.
