- Improved performance by caching cost and valid/invalid neighbours.
This commit is contained in:
Frank
2020-07-30 17:41:26 +02:00
parent 0d42b12658
commit cf9248ecc8
4 changed files with 152 additions and 45 deletions

View File

@@ -1400,4 +1400,14 @@ function UTILS.GetSunset(Day, Month, Year, Latitude, Longitude, Tlocal)
local DayOfYear=UTILS.GetDayOfYear(Year, Month, Day)
return UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, false, Tlocal)
end
--- Get OS time. Needs os to be desanitized!
-- @return #number Os time in seconds.
function UTILS.GetOSTime()
if os then
return os.clock()
end
return nil
end