Time() function
| Case number: | 699969-990580 |
| Topic: | General |
| Opened by: | ptfreed |
| Status: | Done |
| Assigned: | Anonymous |
| Priority: | 4 |
| Type: | Suggestion |
| Opened on: | Tuesday, September 27, 2011 - 15:16 |
| Last modified: | Wednesday, September 28, 2011 - 22:45 |
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.

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.