Hi bkeppel, welcome to the forum!

I have tried to write a sleep function

The JavaScript environment in Mango provide a sleep function, RuntimeManager.sleep(milliseconds)

Pseudocode is as follows:
If startTimer = True and it has been 10s since startTimer has been set to True, set startRules = true.
Note: I currently have startTimer enabled to udate context.

It sounds to me like what you want is to put a "State" event detector on the startTimer point, having a 10 second duration (to ensure it's been in the start timer state for 10 seconds), and then create an event handler to do the control that you would like to do after the event becomes active (eliminating the need to sleep in the script).

You should do what makes sense to you though, if knowing about the existing sleep function is enough to achieve what you're working on.