I have some code shown below:
#include <stdio.h>
#include <sys/time.h>
typedef struct{
struct timeval timestamp;
}teststruct;
class TestClass {
public:
TestClass();
void dosomething(int, int);
};
TestClass::TestClass(){
}
void
TestClass::dosomething(int num, int numb) {
}
int main(void){
TestClass *testclass = new TestClass();
teststruct test;
gettimeofday(&test.timestamp, NULL);
printf("%llu \n", test.timestamp.tv_sec);
testclass->dosomething(1,1);
printf("%llu \n", test.timestamp.tv_sec);
}
The output of this code is:
13825459612132795564 dosomething 5598307500
but I have no idea why the first number is messed up. Also the class call is completely necessary in order for the numbers to be different from one another.