You should stop the timer in your event and start again, just to make sure that your execution doesn't enter the event twice. Like:
private static void OnTimedEvent(object source, ElapsedEventArgs e)
{
timer.Stop();
if (elapsedTime > totalTime)
{
return;
}
else
{
// here I am performing the task, which starts at t=0 sec to t=10 sec
timer.Enabled = true; //Or timer.Start();
}
elapsedTime += interval;
}