Use the system call ntp_adjtime() instead of the program ntpdc.