Added Loop timer into main

Added Loop timer into main