How to delay 5 min before starting a windows service?

Viewed 10180

I'm using .Net 4 to build a simple windows service , the problem happens when I want to make a 5 min delay before starting the service.

protected override void OnStart(string[] args)
{
    // make a 5 min delay
    // do something
}

but after few seconds the service stops and gives me a time out error (saw this in the event-log). what am I suppose to do?

8 Answers
Related