added getTime to clock and added countdownlatch synchronization