refactored to a working state

first version was hacky and stupid at best, this version actually works
and uses patterns that make sense and keep actual time, no point in
going into the details.

yyyyeaaaaahhhhhhh

Signed-off-by: Chris Jones <chris@jonezy.org>
Merge branch 'time-fix'