How can I set the time before the screen dims?
It is determined by the Auto Lock time and cannot be set independently of it. The Auto Lock can be changed in Settings > General > Auto-Lock. The longer you set it to not auto-lock, the longer the display will maintain it's normal brightness.