Added compareTimestamp() function