Code: Select all
count = 0;
void function(){
if(count==0)
now=chTimeNow();
if(count==1)
now1=chTimeNow();
count++;
}
i call function() from a thread every 1000 ms and finally read through GDB global var now and now1. Why now is greater than now1?
Moderator: RoccoMarco
Code: Select all
count = 0;
void function(){
if(count==0)
now=chTimeNow();
if(count==1)
now1=chTimeNow();
count++;
}