Whatever you are using to trigger the lights to come on (e.g. motion sensor), use that to trigger the lights and a macro. For example if your light is on B1, and your motion sensor is set to trigger B1 to turn on. Create a smart macro with a trigger of B1 On. Where it says "Drag modules here", Click and drag "DELAY" to that box and set it to 10 minutes. Next, at the top in the drop down box that says "Conditions", select the room (e.g. Bathroom) where the light module is stored. Drag the module B1 under your delay and select to turn that module off.
Now when you enter the room, the motion sensor will trigger the lights on and start the macro which will wait 10 minutes and shut the light off. Motion sensors like the MS14A can be set to automatically send an OFF signal after a set amount of time. This can be a problem if the motion sensor is set to shut off after 4 minutes and your macro is set for 10 minutes. You would be expecting it to shut off after 10 minutes because of your macro, but it would shut off after 4 minutes because of the sensor. The MS14A sensor can be set to 1, 2, 3, 4, 8, 16, 32, 54, 128, and 256 minute delay intervals.
The other thing to watch out for on some motion sensors is the dusk/dawn feature, but I'll let you read up on that one.
Click here for the MS13A and MS14A manual