How can I use the wait function I made for when It Instantiates sphere that it will wait after doing so?

using UnityEngine;
using System.Collections;

public class player : MonoBehaviour {

public int x;
public int y;
public int z;
private int speed = 5;
public Rigidbody sphere;
public Transform barrel;
public float time = 0.5F;

void timer(){

	object clock;
	 
	clock = new WaitForSeconds (time);

	}

// Use this for initialization
void Start () {

	transform.position = new Vector3 (x, y, z);

}

// Update is called once per frame
void update () {

	transform.Translate (Vector3.right * Input.GetAxis ("Horizontal") * speed * Time.deltaTime);
	transform.Translate (Vector3.forward * Input.GetAxis ("Vertical") * speed * Time.deltaTime);
	transform.Translate (Vector3.up * Input.GetAxis("Jump") * speed * Time.deltaTime);

	if (Input.GetButtonDown("Fire1")){ 

		Rigidbody clone;
		clone = Instantiate(sphere, barrel.position, barrel.rotation)as Rigidbody;

			}

			                    }

		                    }

You can wait with StartCoroutine() function.

void update () {
if (Input.GetButtonDown("Fire1"))
StartCoroutine(InstantiateBarrel());
}


IEnumerator InstantiateBarrel(){
		
		yield return new WaitForSeconds (0.5f);
		
		 Rigidbody clone;
clone = (Rigidbody)Instantiate(sphere, barrel.position, barrel.rotation);
	}

You could use a Coroutine with an IEnumerator

void Start()
{
   StartCoroutine(FunctionToWait(5f));
}

IEnumerator FunctionToWait(float duration)
{
   // before pause of arbitrary duration
   // ...

   yield return new WaitForSeconds(duration);

   // after pause
   // ...
}