incrementing instead of counting

Void(RotateGaurd)
{
isTimeOn = true;
If(isTimeOn)
{
time += Time.deltaTime;
if(timer <=100)
{
do stuff;
}}
}

this increments instead of starting a timer.
i can get a timer to begin in update but not in other functions
what am i doing wrong ??
cheers,
SixPence.

this is not how you make a timer.

it is extremely easy to make a timer in Unity:

Invoke( "somethingHappens", 5.0 );

and then …

function somethingHappens()
{
Debug.Log(" five seconds has passed ");
}

OK? Here’s the doco

also go to unityGEMS.com for many articles on this