By borer on shabbos, what is the time limit for the condition of ‘m’yad’ ( to be eaten right away)?
There is no “formal” time limit for this, and the actual time limitation will depend on the individual circumstances of each case.
The principle is that act of separation should be clearly linked to the act of eating (or other relevant use), so that it is not considered “separating” but rather “eating.”
In the act of eating, “miyad” will mean right away: separating as part of the act of eating. However, we find for instance that it is permitted to sort pastries even where they won’t be eaten right away, because having them arranged on the table is itself an “immediate use,” much as sorting cutlery in the right place on the table, which is permitted (Maor HaShabbos p. 486, citing from Rav Shlomo Zalman Auerbach).
Matters of borer are very delicate, and the line between a Torah prohibition and a permitted act is thin. Where you are in doubt you should ask a rav for guidance.