I have a single line of code in my app server code which gets me the timestamp value using steady_clock
as shown below:
uint64_t now = duration_cast<milliseconds>(steady_clock::now().time_since_epoch()).count();
Now we have two systems machineA which is running Ubuntu 12 (gcc 4.6.3 compiler)
and machineB which is running Ubuntu 14 (gcc 4.8.2 compiler)
.
Now we compile our app server code using make on another Ubuntu 12 VM (which has 4.7.3 compiler)
and then copy the tar file that gets generated to machineA and start our app server. After the start, the above line of code prints out value like this in machineA:
1439944652967
Now we also compile our same app server code using make on another Ubuntu 14 VM (which has 4.8.2 compiler)
and then copy the tar file that gets generated to machineB and start our app server. After the start, the above line of code prints out value like this in machineB:
10011360
You see the difference right? I am confuse why this is the difference, I am not able to understand this? All the code and everything is same. Does anyone have any explanations about this and how can I fix it?
If needed, I can try adding some debug code to see what's wrong to figure out this issue.