Add Code from Java Code Geeks
Added Timer to get the runtime from the Encoder