update appmon4j to modularized version and switch time measurement to appmon4j implementation (which was copied from here)