Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function that returns start timestamp of just invocation #1020

Open
casey opened this issue Nov 4, 2021 · 2 comments
Open

Add function that returns start timestamp of just invocation #1020

casey opened this issue Nov 4, 2021 · 2 comments

Comments

@casey
Copy link
Owner

casey commented Nov 4, 2021

@page-down, what did you have in mind here, and what were you thinking of using it for?

@page-down
Copy link

It is still mainly caused by the original problem that the processes in recipes cannot share and know the overall situation.

For example, this is used to output in each recipe the overall time that has elapsed at the time the step is completed. The last step outputs the overall time spent.

A "started_at := date +%s" solves it, but adds process overhead and is not cross-platform portable.

I see that the date and time functions are currently missing. If you still want to extend it, you can think in this direction. It's good to try to cover some common utility functions, I think. The catch is that it doesn't cause just bloat.

@casey
Copy link
Owner Author

casey commented Nov 4, 2021

That all makes sense. I think start_timestamp(), which returns seconds after the epoch, would be good to add. New functions that don't require adding additional dependencies shouldn't create bloat, and are probably worth it even if only a few people find them useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants