fix when date is changed on PC

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@246 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
aymeric 2009-02-07 11:35:38 +00:00
parent 0a9abb91ce
commit e02fb193f9

View file

@ -266,7 +266,7 @@ static uint64_t get_cur_time(void *unused){
return (ts.tv_sec*1000LL) + (ts.tv_nsec/1000000LL);
#else
struct timespec ts;
if (clock_gettime(CLOCK_REALTIME,&ts)<0){
if (clock_gettime(CLOCK_MONOTONIC,&ts)<0){
ms_fatal("clock_gettime() doesn't work: %s",strerror(errno));
}
return (ts.tv_sec*1000LL) + (ts.tv_nsec/1000000LL);