Time() function

Started by ptfreed

ptfreed Lv 1

An easy one: Can we have access to the a time function (e.g. seconds since epoch, or some such)? Primary use case: It would allow scripts to display elapsed time and (sometimes) estimated time of completion. It could also be used to self-tune scripts that find they are spending too much time in algorithm X without much gain.

It would also allow scripters to break scripts up into units that are more human-centric – though not necessarily the most meaningful in terms of the proteins. Might be especially handy in the end-game: "Do this for two hours, then that for 4 hours…."

Add-ons that would make it even more useful:
1) The ability to format a date/time string for output
2) The ability to read the "end-of-puzzle" time, so scripts can "tune themselves" to it automatically.

Thanks.

ptfreed Lv 1

An implementation thought. Time could be delivered in seconds, but as a decimal number instead of an integer. That way folks who want a simple measure of elapsed time can get it – but folks who want microsecond accuracy (and you just know that someone out there is going to request this) can have what they want, too.