added a periodic worker

The periodic worker will call a function periodically based on an input duration
testing.LongWait is traditional for never-happen timeouts