Use unsigned long long int instead of long for time