Timing chain. But lots of reported problems with the N47 engine and its chain. If the car has made it to this age then it's probably fine (most issues occurred in the first few years of ownership).