Ironically, your kernel measures TAI time perfectly happily if unmolested, as that always ticks once for every SI second (ignoring oscillator drift). No slewing. No smearing. No stepping.
Also, "since Unix time was created before leap seconds." I found this interesting for the simple reason I've never spent any time thinking about Epoch vs Leap Second histories.
tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
(tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400Go and read about "right" versus "posix" timezones.
So it's cyclic and doesn't make sense outside the earth reference frame
Edit: since 2019, 1 second is defined by taking the fixed numerical value of the caesium frequency ∆νCs, the unperturbed ground-state hyperfine transition frequency of the caesium-133 atom, to be 9192631770 when expressed in the unit Hz, which is equal to s−1
So a second makes sense in the galactic scale at least as long as Caesium-133 is a stable isotope in that environment
> realisation of the metre is usually delineated (not defined) today in labs as 1579800.762042(33) wavelengths of helium-neon laser light in a vacuum
"Local seconds since 1970", vs. "Static seconds since 1970".
In a broad sense, the answer goes like this: Almost everything in the galaxy shares an approximate reference frame when it comes to velocity and special relativity. For general relativity and gravity, that's obviously a distortion so it doesn't count.
In the long term, to prevent very minor drift, we can use quasars as a reference.
Number of seconds since a given time seems fine until we're travelling significantly outside of a common reference plane.
Unix time decrees every day has exactly 86400 seconds. But the introduction of leap seconds means that While most days have 86400, some earth days have 86401 seconds and potentially there could also be days with 86399
TAI makes sense everywhere, Unix time only on earth.
Unix time is [...] the number of seconds that have elapsed since the Unix epoch, minus leap seconds.
- Wikipedia
If you are on Mars you'll have to update your computer time every ~6 months when Earth release a new table of leap seconds caused by e.g. earthquakes.
It's extremely weird and IMHO completely ruins the purpose of a timestamp, but it's a compromise for backwards compatibility, since Unix time was created before leap seconds. This hack ensures that the number of seconds in a day remains fixed, an assumption of many systems at the time.