# Tweaking the wallclock, non-NTP



## Juha Nurmela (Aug 31, 2016)

Wallclock in my PC gains a second or two each week. Normal, I guess, but irritating. I don't want to use NTP, as an exercise, and I'm just wierd like that. Couple of years ago, I looked for a sysctl knob or loader setting, but could not find one that would help. Maybe I did not look hard enough. Maybe things have changed.

Anyway, ntp_adjtime(2) does seem to work set-and-forget kind of way too. Simple utility attached. Using `trimclk -f -3.35` the clock now loses a millisecond per day, more if heated up.

Juha


----------



## ronaldlees (Aug 31, 2016)

Thanx for the code snip.  I'm just thinking, I should do something similar to substitute my GPS clock to use in place of internet servers.  Should be easy.


----------



## Juha Nurmela (Aug 31, 2016)

An oven glued to the crystal would be nice. This is too cramped and miniature to do that.

As it happens, this laptop has a builtin GPS. I check the difference hourly, and adjust with adjtime(2) (in addition to that boottime ntp_adjtime) as needed. clock icon click. Although the GPS is behind an USB tty, and is not serious hw by a mile (no PPS or anything) the start of the NMEA blurt each second is accurate to 1 msec and better. Usually. If not loaded 

Juha


----------



## ronaldlees (Aug 31, 2016)

The accuracy is nice (with or without PPS).  More important for my purpose is the ability to be free of any internet connections.


----------



## Juha Nurmela (Aug 31, 2016)

As long as Easter does not slide


----------

