Updated timer class to be cross platform