Qitzur Shulhhan Arukh, Yalqut Yosef (Orahh Hayim 608:2) states (my translation including excerpt from Halakhah.com):
צריך לסיים אכילתו ושתייתו מבעוד יום, כי מצוה מן התורה להוסיף מחול על הקודש, וכמו שדרשו חז''ל (יומא פא:) ועניתם את נפשותיכם בתשעה לחודש בערב, יכול משתחשך, תלמוד לומר בתשעה לחודש, הא כיצד מתחיל ומתענה מבעוד יום, מכאן שמוסיפים מחול על הקודש. [ש''ע סי' תרח ס''א] [...] וכן צריך לפרוש ממלאכה ומאיסורי שבות מבעוד יום, מלפני שקיעת החמה, מעט או הרבה. וזמן התוספת הוא מעט קודם שקיעת החמה. ודי אפילו בכל שהוא מן התורה כל זמן שלא שקעה החמה.
One must finish eating and drinking while it is still daytime, because it is a Biblical commandment to add from the mundane unto the holy as HaZa"L exegeted (Masekhet Yoma 81B):
"And ye shall afflict your souls, in the ninth day of the month. One might have assumed that such affliction commences on the ninth of the month already. Therefore the text reads: ‘At even’. If from ‘at even’, one might have inferred that one must afflict oneself only after it gets dark, therefore the text reads: ‘In the ninth’. How is [this to be explained]? He should commence to afflict himself whilst it is yet day. From here we learn that we add from the profane time to the sacred one." (see Shulhhan Arukh, Orahh Hayim 608:1)
Therefore, one should cease from melakhah and from shevut prohibitions while it is still daytime (i.e. before sunset, either a short or long time). And the duration of the [addition from the mundane unto the holy] is a short time before sunset. And, Biblically speaking, any amount of time while the sun has not yet set is sufficient.