Added common method for clearing and checking timestamp. Clears timestamp by -1/-1 by default.