Synchronized shared counter, and fixed timing for startTime in threads