In Vedic astrology and the Hindu calender[1] too, we have 29.5 days per lunar month. And that totals to 354 days/ year. To make up the difference, we have one extra month every three years. This is known as ‘Aathik Maas’. [2]

Time was measured with a water clock. From seconds to lunar movements. It is part of the origin story of the mathematical treatise/puzzle book Lilavati by mathematician Bhaskaracharya and is described in it.

[..]
During 2018, Adhik Jyestha (extra month after Jyestha) was observed from 16 May to 13 June. In 2020, Adhik Ashwin (extra month after Ashwin) will be from 18 September to 16 October 2020,[..]

[..] The Moon takes about 27.3 days to make one complete orbit around the earth. The earth orbits around the sun once every 365.2422 days (= earth's orbital speed of 29.79 km per second). The earth and the moon in 27.3 days have moved as a system about 1/12 of the way around the sun. This means that from one full moon to the next full moon, the moon must travel 2.2 extra days before it appears again as a full moon, due to the curve of the earth's orbit around the sun. Ultimately this creates a variance of 10.87 days a year between a lunar year and a solar year. To compensate for this difference, the additional month is added after every 32.5 months on average.

Just as there are lunar years with the extra month making 13 total months, there are lunar years with a reduced number of months, with only eleven months in the particular lunar year. The lunar year with eleven months is very rare. It occurs once in 140 years or once in 190 years.[..]

ETA:
The timekeeping devices and calender itself might have come from Mesopotamia (via ancient Greco-Roman routes). It is mentioned in Surya Siddhanta[3]

[..] The influence of Greek ideas on early medieval era Indian astronomical theories, particularly zodiac symbols (astrology), is broadly accepted by scholars. According to Jayant Narlikar, the Vedic literature lacks astrology, the idea of nine planets and any theory that stars or constellation may affect an individual's destiny.According to Jayant Narlikar, one of the manuscripts of the Surya Siddhanta mentions the deva Surya telling the asura Maya to travel to ancient Rome, representing the Greco-Roman world, where Surya would reveal astronomical knowledge in the form of a Yavana (lit. 'Ionian') the Sanskrit term for Greek-speakers:

"go to Rome, your own city, where, because of a curse of Brahma I will reveal to you this knowledge in the guise of a Yavana."
The astrology field likely developed in the centuries after the arrival of Greek astrology with Alexander the Great, their zodiac signs being nearly identical.

According to Pingree, the 2nd-century CE cave inscriptions of Nasik mention sun, moon and five planets in the same order as found in Babylon, but "there is no hint, however, that the Indian had learned a method of computing planetary positions in this period". In the 2nd-century CE, a scholar named Yavanesvara translated a Greek astrological text, and another unknown individual translated a second Greek text into Sanskrit. Thereafter started the diffusion of Greek and Babylonian ideas on astronomy and astrology into India.[..]

The main treatise in the most popular form of Vedic astrology today is BPHS or Brhat Parashara Hora Sastra [5] written somewhere between 600-750 CE. Hora itself a Greek loan word to Sanskrit.

And there is an obscure school of Indian astrology that refers to knowledge from Greece. Yavanajataka(yavana = greek/Ionian)[4]

[..] Yavanajataka is one the earliest known Sanskrit works referencing western horoscopy. It was followed by other works of Western origin which greatly influenced Indian astrology: the Paulisa Siddhanta ("Doctrine of Paul"), and the Romaka Siddhanta ("Doctrine of the Romans"). However, the earliest known Sanskrit work on horoscopy is Vedanga Jyotisha[..]

I have just started studying Vedic Astrology and have a lot more foundational source text to read before I can get to this, but the Greek connection reminded me of Yavanajataka that was on my ‘to read’ list.

[1] https://en.m.wikipedia.org/wiki/Hindu_calendar

[2] https://en.m.wikipedia.org/wiki/Adhik_Maas

[3] https://en.m.wikipedia.org/wiki/Surya_Siddhanta

[4] https://en.m.wikipedia.org/wiki/Yavanajataka

[5] https://en.m.wikipedia.org/wiki/Brihat_Parashara_Hora_Shastr...