Adding actual measurement of CLOCKS_PER_SEC because it seemed incorrect before.
Research showed that value is not always defined correctly on systems.
Passing constant pinter for reading serial data.
Added realtime functionality.
Using realtime system.