get obstacle speed to gradually increase

Hi Guys
I am trying to get my obstacles speed to gradually increase in an endless runner game say like every 30 seconds but I am struggling to get a solution here is what i have so far for my obstacle and trying to increase the speed

//obstacle Script
using UnityEngine;
using System.Collections;

public class Obstacle : MonoBehaviour {

	private float speed = -9f ;
	private Rigidbody2D myBody;

	void Awake () {
		myBody = GetComponent<Rigidbody2D> ();

	void Update () {
		myBody.velocity = new Vector2 (speed, 0f);
		speed = speed + (-0.5f);

i am new to unity and not fully familiar with the setup any help would be appreciated

If you use += it will accumulate the var every time it is called. Also when using a timer you can choose how often to increase your speed. Hope this helps.

    public float savedtime = 0;
    public float TimeDelay = 30f;

    private void Update ( ) {
         if((Time.time - savedtime) > TimeDelay ) { 
             savedtime = Time.time; //reset the saved time

             myBody.velocity = new Vector2 (speed, 0f);
             speed += 0.5f; // += will allow your speed var to accumulate