@Override
    public void run() {
        realTimeCounter.incrementPosition();
    }
Date 03/03/2015
@author tusroy

Develop a software to count number of events in last 5 mins. You have to support two apis
1) addEvent() -> It means increment event by 1
2) getTotalEvents() -> Return total number of events in last 5 mins

Program should support millions of events every minute and should also provide multi-threading support

This class might not have 100% accuracy as far as events in last 5 mins are concerned. 
Since we are using circular queue last second information may not be very accurate.

Solution:
Keep atomiclong of 300 in array. PositionUpdater updates position every second.
@Threadsafe
src/com/interview/multithreaded/RealTimeCounter.java