Implementing Threshold and Time To Threshold

Card: analytics 699
Change-Id: Ia52efad15c18e954d93136ffffdfa879804179af
resolved merge

Change-Id: I77690f1282c6ad3861f13f024fc16802e4f9839d