Added get state function to state machine
Added "decrementwithrollover" macro
Added extra functionality to time utilities