Controller DateTime

Summary

Formal request for DateTime URscript functionality in Polyscope.

What is it?

Adding functions such as:

URcontroller.get_Time() returns array - [hh, mm, ss]
URcontroller.get_Date() returns array - [DD, MM, YYYY]
URcontroller.get_DateTime() returns array - [DD, MM, YYYY, hh, mm, ss]
URcontroller.get_Year() returns integer
URcontroller.get_Month() returns integer
URcontroller.get_Day() returns integer
URcontroller.get_Hour() returns integer
URcontroller.get_Minute() returns integer
URcontroller.get_Second() returns integer
URcontroller.get_Elapsed_Time(<past_time>,<present_time>) *returns array - [Days, Months, Years, Hours, Minutes, Seconds]
URcontroller.is_Time_Exceeded(<past_time>,<present_time>) returns bool

…add military and other additional formats (please feel free to add additional missing time based queries by replying below, I know I’m probably missing a few important ones)

Why is it needed?

Currently the only solution for time based programs or requests are through A) timers B) wait() and C) URcap Get Controller Time. These work to an extent but can require additional modifications in the SDK to add additional functionality (if using URcap). This topic has been discussed in several forum posts and surprisingly hasn’t made it to becoming basic URscript functions for users to take advantage of (e.g. tracking time elapsed even through switching loaded programs, reseting variable after several days, log or data recording at specific intervals).

Hopefully this request doesn’t seem too specific but I’m curious to hear what others in the URcommunity think, thanks!

-Michael

6 Likes

This all make sense only when you have accurate time in Polyscope. This is step #2 .
Step #1 is in my opinion to ask a time server (internet or intranet) to set the original date/time to Polyscope.

My bots are not connected to any servers so I don’t want/need to connect to a time server, but having a Date/Time function based on poly-time would be much appreciated. .