My friend told me the longer I survive in battle the more likely legendary drops, and death will reset the timer,is this true?
No, death does not affect your legendary drop rate. There indeed is a "timer" so people won't get frustrated for not getting a legendary. This timer tick only when you are fighting monsters (so idling in base won't get you a legendary), it is made so no player can fight for more than 10 hours without finding one. Nothing reset the timer except finding a legendary.
This is based on a long-standing idea that legendary drops are based on a timer, which is completely false.