Refactored getting server time
Using X server time instead of time.time()