Timer reset after elapsed time.

I'm struggling with this one. At the moment I'm using something that basically works like this:

private var startTime : int = 0;
private var roundTimeLeft : int = 0;
public var roundTimeSeconds : int = 600;

function Awake ()
{
  startTime = Time.time;
}

function Update ()
{
  roundTimeLeft = Time.time - startTime;
}

I'd like the timer to reset to 0 in my `if (roundTimeLeft >= roundTimeSeconds)` condition also located in update, and then continue counting upwards from 0. Any help would be much appreciated.

I think this should do it:

function Update ()
{
    roundTimeLeft = Time.time - startTime;
    if (roundTimeLeft >= roundTimeSeconds)
    {
        startTime = Time.time;
        roundTimeLeft = 0;
    }
}

Though the variable name (roundTimeLeft) is a little iffy, seeing as it's the opposite of the time left (it's how much has elapsed)