Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: consider adding NewTimerAt(t Time) and At(t Time) functions #2729
Hello, I'd like to make a feature request for a "At" and "NewTimerAt" functions to the time package. They would be similar to After() and NewTimer(), except that instead of specifying a duration, they specify a instant in time and at some point after that time, the current time is sent to the channel. Such functions would: - be useful to schedule code execution or implement crontab-like functionality - be closer to what is actually implemented by the runtime It is not clear whether it can be emulated with the current After() and NewTimer(), since they internally syscall nanotime() which may return after an indeterminate duration. Rémy.