Extensible timer design

I would like to make a workflow that listens to signals. As long as signals are coming in, I’d like it to run (up to a point; after some longer time period I’d like to stop listening and do something with the received signals).

I thought I could do this by setting a timer and then canceling/creating a new timer when a signal comes in. It seems like the first timer future always resolves even when I cancel it.

I think I’m missing something really basic here

What is the SDK you are using? It can be SDK specific. In general when a timer is canceled its future is resolved immediately with a cancellation failure/exception.