hi,
in my program i m doing some timer related stuff, now my problem is that "how I can determine if the time of system is changed by any user manually or ntp client?"
hi,
in my program i m doing some timer related stuff, now my problem is that "how I can determine if the time of system is changed by any user manually or ntp client?"
That's pretty difficult unless you have second time-source. You could of course talk to a known good time-source (e.g. NTP server).
What is the purpose of detecting this?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
i made one program which work like cron and it will take same format as cron ,
i add one extra parameter of second, which is use to execute the job on occurrence of particular second now when may application is running and some change the time of system the i have to rearrange my list, my application is work on feature date, it will make the feature date of the job given to my application, now in case of time changing i have to rearrange the list so that's why.
Ok, so perhaps you can do
It is not perfect, but should catch any large changes.Code:for(;;) { sleep(10); now = getcurrenttime(); if (abs((now - old) - 10) > 1) ... Need rearrange list. old = now; }
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
ok
i wll try it