Added timer functionality

Still very buggy. Should probably revamp everything to use absolute
getappdata references