activation time and c # problem

I want to activate and deactivate the object but it gives me error timeline

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class TextoComprado : MonoBehaviour {

public GameObject AvisoComprado;

public void AvisoCompra () {

AvisoComprado.SetActive ( true );
WaitForSeconds(2);
AvisoComprado.SetActive ( false );

}

Coroutines need to return IEnumerator, not void.

Also, use [code ][/code ] tags and don’t add polls pointlessly.