Well, this is kind of curious.
If we say that the entire hive mind arrived, and tall the necron worlds awoke at the same time (in a literal Vs situation) Then I can say we're entirely
ed.
Tyranids wouldnt die from not consuming Necrons, they'd just eat worlds with life. And like mentioned, both beings have no reliannce on the warp, so all other races are butt screwed. However, I picture the C'tan and the bad guys from Mass Effect having a similiar straegy. Wait untill galaxy is full of life. Wake up, eat almost everything. Go back to sleep. Wait. Which, if the necrons did choose that strategy...well, they might just do the same thing as in the first war "Oh, jeez. Lots of people dying, keeps liek this and we will have nothing to eat. Lets just nap until theres more things to eat" in which case, the tyranids will win, they'll eat every world that isn't already a barren rock, and the necrons'll never wake up.
However, i find another siutation more interesting. We saw one hive, while fighting the tau, develop a resistance to pulse and plasma weaponry. The Tau where able to overcome this by using other weapons, such as Kroot rifles...but what if the Tyanids, fighting the Necrons, would develop a defence against gauss weaponry?
The Necrons would be screwed, ALL their weapons are gauss weaponry. They'll have to start hitting the tyanids. Which...well. Wouldn't work very well.
We also don't know how many Tyranids there are, they're coming from another galaxy, for all we know, they have consumed that Galaxy, imagine, an entire galaxies worth of Biomass. Imagine, there is the possiblitty they only came to that galaxy from another...essentially we have a Hive Mind with two galaxies Biomass coming...maybe three? We don't know. They might have even killed, eaten, or eradicated races and beings more powerful then the imperium or the necrons in the previous Galaxy, in which case, the Swarmlord is goign to have a cakewalk.
There might be so many tyranids, you could literally walk over them from one planet to another. Thats a lot of hive ships..with a lot of Nids.
But I suppose thats the problem with these two insane forces, we truely do not know much about them. We do not know the extent of the Necrons technology. I mena, for all we know the deciever may have developed some sort of star-shotgun.