updated timer implementation

decoder uses thread rather than pointer to thread