codes for detecting mobile double tap and hold

hello i have 2d game that i want it to detect a mobile double tap and hold can anyone give me an idea or maybe a full c# script?

For double tap:

For hold:

private float holdTime = 0.8f; //or whatever
private float acumTime = 0;

void Update()
{
   if(Input.touchCount > 0)
   {
       acumTime += Input.GetTouch(0).deltaTime;

       if(acumTime >= holdTime)
       {
           //Long tap
       }

       if(Input.GetTouch(0).phase == TouchPhase.Ended)) 
       {
           acumTime = 0; 
       }
   }
}