There is no timer. The switch in the trunk only turns the light on when the decklid is open, and off when it is closed. If you leave the trunk open the switch remains on. Your car has a battery saver feature that will shut off power to interior lamps and the trunk lamp 10 minutes after the ignition key is turned of. The car'* electric power management system may decrease this time period if your battery is low, which is probably why you experience variance in shut off times.
Try leaving the driver'* door open instead of the trunk. The interior lights will shut off in 10 minutes or less, depending on battery condition.
This is all explained on pages 4-13 and 4-14 of the owner'* manual I provided a link to. If your manual is different, look in section 4 (Features and Controls).
In short, I do not believe there is a problem in what you are experiencing.
2001 Bonneville SSEi (retired at 365,000 Kms.)
2014 Jeep Grand Cherokee Overland (yes, I know its not a GM)