How to calculate t in shm when you have displacement.