Using Reactive Extensions, and the support in Excel-DNA for making 'live' RTD formulas from Reactive Extensions IObservables, might give you one approach. You could take the refresh rate as one of the parameters to your function, and then set up your Observable using something like the discussion here: Polling a website using Rx
That resulting IObservable is then exposed to Excel as a 'live' worksheet formula through the RxExcel support in Excel-DNA. Every update of the observable will update the corresponding cells that called that function.