Tā bǎ yí bùfen shíwù cáng qǐlái, yǐbèi bùshízhīxū.
He hid part of the food away for any unforeseen need.
Tips
history
From Su Shi's Song-dynasty prose-poem 《后赤壁赋》 (Second Red Cliff Rhapsody): 我有斗酒,藏之久矣,以待子不时之需 — 'I have a measure of wine, long stored, awaiting your unexpected need.' The sense 不时 here is 'not at a fixed time' → 'at any moment.'
grammar
Almost always appears in the fixed frame 以备…/以防不时之需 ('to prepare for / guard against an unforeseen need'). Don't use 不时之需 as a standalone noun in casual speech.