public static long stop(@NonNull String key){
  long now=System.currentTimeMillis();
  Map<String,Long> currentMap=map.get();
  Optional<Long> maybePreviousInstant=Optional.with(currentMap.get(key));
  if (maybePreviousInstant.isEmpty()) {
    Log.warn(Timer.class,"There is no timer started for key '%s'. It might have already been stopped!",key);
    return 0;
  }
  long duration=now - maybePreviousInstant.get();
  currentMap.remove(key);
  map.set(currentMap);
  return duration;
}

public static long stop ( @ NonNull String key ) { long now = System . currentTimeMillis ( ) ; Map < String , Long > currentMap = map . get ( ) ; Optional < Long > maybePreviousInstant = Optional . with ( currentMap . get ( key ) ) ; if ( maybePreviousInstant . isEmpty ( ) ) { Log . warn ( Timer . class , "There is no timer started for key '%s'. It might have already been stopped!" , key ) ; return 0 ; } long duration = now - maybePreviousInstant . get ( ) ; currentMap . remove ( key ) ; map . set ( currentMap ) ; return duration ; }
stops the timer for specified key
