Example of co-routine for documentation

In the Unity documentation it states:

  1. Use Coroutines. The problem with Update calls is that they happen every
    frame. Quite possibly checking the
    distance to the player could be
    performed only every 5 seconds. This
    would save a lot of processing power.

http://unity3d.com/support/documentation/ScriptReference/index.Performance_Optimization.html

How would you set up a co-routine to execute every 5 seconds to toggle enabled state of a behaviour?

Try this (C#):

public class Example : MonoBehaviour {
    public void Start() {
        StartCoroutine(Enable());
    }
    public IEnumerator Enable() {
         while (true) {
             enabled = !enabled;
             yield return new WaitForSeconds(5);
         }
    }
}