adding save and restore functions to flextimer