I have a method that sends push me updates with the % complete at a given time.

```
public Task MyMethod(IObserver<double> progress)
{
   ...
}

```

My consumer does this:

```
ISubject<double> progressObserver = new Subject<double>();
await MyMethod(progressObserver);

```

It subscribes to the `subject` to watch for updates:

```
progressObserver.Subscribe(percent => Console.WriteLine(percent));

```

That works nicely, but I would like to calculate an ETA (the estimated time to complete). I know it can be calculated considering the time and percentage, but how?

For sure there's an elegant way to do it using `Observables` (System.Reactive), maybe taking the last `n` percentage notifications and the elapsed time between them to estimate when the 100% will be accomplished.

But, excuse me, I don't have a clue on how to do it nicely and elegantly.