W
Wei Jones
Hi, all
I got a problem as subject title. I create a pthread which like :
static time_t *Now;
void get_time(void *tmp)
{
while(1) {
time(&Now);
disp_time_somewhere();
sleep(1);
}
}
In other task, I use time(&Before),too. And there is a small chance,
get_time() update (Before)'s value.
I have already fixed my code.
But I dont wanna guess the really answer, Can you help me ?
Thans a lot.
I got a problem as subject title. I create a pthread which like :
static time_t *Now;
void get_time(void *tmp)
{
while(1) {
time(&Now);
disp_time_somewhere();
sleep(1);
}
}
In other task, I use time(&Before),too. And there is a small chance,
get_time() update (Before)'s value.
I have already fixed my code.
But I dont wanna guess the really answer, Can you help me ?
Thans a lot.