extract ClockMonotonic package
implement Window object to pass to state callbacks
remove previous implementation as it is broken now
update test for time states