Development of time-based refresh

@bgoodri, I’m close to finishing the time-based refresh thing. I had switched over to working on the makefile stuff which was more pressing.

If you have a minute, can you take a look at this branch?

Let me know what you think. Is that going to be sufficient to make it work from RStan?

And for anyone keeping track, this is the original issue: stan-dev/stan#2070

If you think it’ll be good enough, I can look back into it and figure out what’s left to do.

I think with timed based refresh, we want to show the estimated time to completion in the output. I put that in the other PR. It was basically just calculating iterations per second as the number of iterations completed since the last time-based refresh divided by the refresh interval and then multiplying by the number of iterations remaining.

That sounds cool. That isn’t in the description of the issue… can you put it there?

Can we accomplish that with the current way that the branch deals with it?

That’s going to be a very wobbly time estimate given the discrete epochs of warmup and the fact that warmup usually takes about twice as long per iteration as sampling averaged over all iterations. I’m OK with trying it to see if it’s helpful.