Because the framework processes the returned data, changing it to a closure format seems like a big step. For this requirement, I mainly want to reduce the frequency of calls through count. Now I use another method instead, which is to use the current time as a reference. This is equivalent to a global variable.
You can use closures to achieve it. The general idea is as follows:
can be marked with a global variable
Because the framework processes the returned data, changing it to a closure format seems like a big step. For this requirement, I mainly want to reduce the frequency of calls through count. Now I use another method instead, which is to use the current time as a reference. This is equivalent to a global variable.