N
N
Nicholas2019-10-08 20:48:07
go
Nicholas, 2019-10-08 20:48:07

golang. 10 thousand alarm clocks. Which is less resource intensive?

Hello. Tell me what will be less resource-intensive?
For educational purposes, you need to make an alarm clock that will work in a year. At the same time, you need to set 10 thousand of these alarm clocks. (each start time is random, its own).
What would be the best way to do this? Through the ticker / timer mb somehow differently?
Question While on pause, a little later I will add the code and describe the question in more detail.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Papa, 2019-10-09
@Ow192

Yes, at least 10 million ....
Take the time of the next alarm, calculate the time delta from the current one, set a ticker / timer, do what you need when triggered, repeat for the next alarm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question