Create clock class

copy pasted some stuff from eclipse to git.