Add function to get system time