thread_timer: copy paste of the test code for timerfds

when done this will be a thread that updates a shared global time
variable on the best clock available. Another thread can
get the current time with a get_atomic(&current_time); BUT:

As a time_t is usually 64 bits and 32 bit arches don't have atomic
operations on 64 bits, this can be off a bounced pointer, so
inside the thread you'd have

priv_time[2];
priv_time[i % 2] = priv_time [(i-1) %2] + 1000*1000*1000; // 1ms
*curr_time = &priv_time[i++ % 2];

and the other threads would just fetch the time off the curr_time pointer.

I'm not sure which tradeoff to make - a userspace clock that runs
as fast as sane and always has time available without a syscall,
or blocking to get the systime from get_time, or getting time
from a socket timestamp.