Generic Timeofday Simulator

This program simulates the linux kernel timekeeping code.

With inspiration from David Mills kern.c simulator program.


Project Layout:
	sim-arch.c:
		Simulator "arch specific" interfaces for timeofday code
	sim-build.c:
		Junk needed to get the project to build outside the kernel.
	sim.h:
		Junk needed to get the project to build outside the kernel.
	sim-main.c:
		Main simulator init and loop code.
	sim-ntp.c:
		Generated from kernel/timer.c and kernel/time.c with my ntp patches
	timeofday.c:
		Unmodified /kernel/timeofday.c from my timeofday rework.
		(Well, two lines changed: include sim.h and unstatic periodic_hook)
	asm/timeofday.h:
		Unmodified include/asm-generic/timeofday.h from my timeofday rework.
	asm/*:
		Empty Placeholders to avoid compiler warnings
	linux/timeofady.h
		Unmodified include/linux/timeofday.h from my timeofday rework.
	linux/clocksource.h
		Unmodified include/linux/timeofday.h from my timeofday rework.
	linux/*
		Empty Placeholders to avoid compiler warnings
	

Getting started:
1. Generate the simulator from a kernel tree with all of my timeofday patches applied.
	./generate.sh <path to kernel tree>

2. Run make


How to run:
./todsim <inital ns offset> <ppm skew>

It will set the inital offset from system time and the hardware drift value then run forever printing out the following formatted output:

	simulator time:  kernel time  hardware cycle  time offset  ppm adjustment
