Timer operation method, device, apparatus, and storage medium

By establishing a follow-stop relationship between the timer and the tracking target, combining ARC technology with release package management, dynamic cycle and object binding, the problem of automatic stop of the timer is solved, the automatic release and memory management of the timer are realized, and memory leaks are avoided.

CN115469997BActive Publication Date: 2025-10-14CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210908616.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-10-14
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

During the use of the timer of the mobile terminal, if the timer is not stopped manually, the timer will be executed in a loop, causing an operating system failure.

Method used

By establishing a follow-stop relationship between the timer and the tracking target, the timer automatically stops when the tracking target is released. ARC technology and release packages are used to manage memory release, combined with dynamic cycles and object binding functions to achieve automatic release of the timer.

Benefits of technology

This avoids memory leaks caused by timer loop execution, reduces manual operation requirements, and improves the efficiency of timer automation management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115469997B_ABST
    Figure CN115469997B_ABST
Patent Text Reader

Abstract

The application relates to a timer operation method, device, equipment and storage medium, and relates to the technical field of mobile applications. The method comprises the following steps: obtaining configuration information of a timer, wherein the configuration information comprises a tracking target; creating the timer based on the configuration information; establishing a follow-stop relationship between the timer and the tracking target, wherein the follow-stop relationship is used for indicating the release of the timer and following the release of the tracking target; when the tracking target is released, stopping and releasing the timer based on the follow-stop relationship. Based on the technical scheme, the tracking target can be set in the configuration information of the timer, when the tracking target is released, the timer will be automatically stopped and released based on the follow-stop relationship between the timer and the tracking target, the timer can be stopped without manual operation, and memory leakage caused by the cyclic execution of the timer is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile application technology, and in particular to a timer operation method, device, equipment and storage medium. Background Art

[0002] In the operating system of a mobile terminal, there is often a timing requirement, which is generally met by using a timer.

[0003] During the use of the timer, you need to manually stop the timer and release the timer. If you do not manually stop the timer, the timer will continue to loop, causing the operating system to malfunction. Summary of the Invention

[0004] The present application provides a timer operation method, device, equipment and storage medium, and the technical solution is as follows.

[0005] In one aspect, a method for operating a timer is provided, the method comprising:

[0006] Obtaining configuration information of a timer, wherein the configuration information includes: a tracking target;

[0007] Based on the configuration information, create the timer;

[0008] Establishing a follow-stop relationship between the timer and the tracking target, wherein the follow-stop relationship is used to indicate that the release of the timer follows the release of the tracking target;

[0009] When the tracking target is released, the timer is stopped and released based on the follow-stop relationship.

[0010] In another aspect, a device for operating a timer is provided, the device comprising:

[0011] A configuration information acquisition module is used to obtain configuration information of the timer, wherein the configuration information includes: a tracking target;

[0012] A timer creation module, configured to create the timer based on the configuration information;

[0013] a follow-stop relationship establishing module, configured to establish a follow-stop relationship between the timer and the tracking target, wherein the follow-stop relationship is used to indicate that the release of the timer follows the release of the tracking target;

[0014] A timer releasing module is configured to stop and release the timer based on the follow-stop relationship when the tracking target is released.

[0015] In a possible implementation, the follow-stop relationship establishing module is configured to:

[0016] Creating a release package, and adding the timer to the release package;

[0017] The release packet is injected into the tracking target, so that the timer and the tracking target have the follow-stop relationship.

[0018] In a possible implementation, the timer release module is configured to:

[0019] When the tracking target is released, automatically releasing the release package injected into the tracking target based on Automatic Reference Counting (ARC) technology;

[0020] When the release packet is released, the timer in the release packet is stopped and released.

[0021] In a possible implementation, the configuration information further includes: a dynamic periodic code block;

[0022] The apparatus further comprises: a trigger interval updating module;

[0023] The trigger interval updating module is configured to obtain an updated trigger interval through the dynamic period code block when the timer is triggered; and trigger the timer again based on the updated trigger interval.

[0024] In a possible implementation, the apparatus further includes: an object binding module;

[0025] The object binding module is used to establish a mapping relationship between the object and the timer; and query the timer based on the mapping relationship.

[0026] In a possible implementation, the object binding module is configured to convert the object into a string; store the timer in a hash table, and a keyword of the timer in the hash table is the string.

[0027] In a possible implementation, the object binding module is configured to obtain a memory address of the object; and use the memory address as the converted character string.

[0028] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the above-mentioned timer operation method.

[0029] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned timer operation method.

[0030] In another aspect, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described method for operating a timer.

[0031] The technical solution provided by this application may have the following beneficial effects:

[0032] A tracking target can be set in the timer's configuration information. When the tracking target is released, the timer will automatically stop and release based on the follow-stop relationship between the timer and the tracking target. The timer can be stopped without manual operation, thus avoiding memory leaks caused by the timer's cyclic execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0034] Figure 1 The figure is a flow chart showing a method for operating a timer according to an exemplary embodiment.

[0035] Figure 2 The figure is a flow chart showing a method for operating a timer according to an exemplary embodiment.

[0036] Figure 3 The present invention is a flowchart showing a method of following a process corresponding to a stop function according to an exemplary embodiment.

[0037] Figure 4 The figure is a flow chart showing a method for operating a timer according to an exemplary embodiment.

[0038] Figure 5 The present invention is a method flow chart showing a process corresponding to a dynamic period function according to an exemplary embodiment.

[0039] Figure 6 The figure is a flow chart showing a method for operating a timer according to an exemplary embodiment.

[0040] Figure 7 The present invention is a method flow chart showing a process corresponding to an object binding function according to an exemplary embodiment.

[0041] Figure 8 The diagram is a schematic diagram showing the architecture of a timer according to an exemplary embodiment.

[0042] Figure 9 The figure is a structural block diagram of a timer operating device according to an exemplary embodiment.

[0043] Figure 10 is a schematic diagram of a computer device provided according to an exemplary embodiment. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solution of this application in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0045] It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association. For example, "A indicates B" can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B.

[0046] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and being indicated, configuration and being configured, etc.

[0047] In an embodiment of the present application, "predefinition" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a terminal device and a network device). This application does not limit its specific implementation method.

[0048] Figure 1 FIG. 1 is a flowchart of a method for operating a timer according to an exemplary embodiment. The method can be executed by a computer device. Figure 1 As shown, the operation method of the timer may include the following steps:

[0049] Step 110: Obtain configuration information of the timer, the configuration information including: tracking target.

[0050] The configuration information of the timer is information for configuring various parameters of the calculator.

[0051] The configuration information includes a tracking target set for the timer, where the tracking target refers to the object that the timer stops tracking. For example, the tracking target is recorded as _lifeTimeTracker.

[0052] Optionally, the configuration information further includes at least one of the following parameters: trigger time _fireDate, static period _interval, dynamic period _dynamicInterval, whether to repeat _repeats, and trigger event block.

[0053] Step 120: Create a timer based on the configuration information.

[0054] After obtaining the configuration information of the timer, create the timer using the set configuration information.

[0055] In the embodiment of the present application, the created timer may be a timer based on Grand Central Dispatch (GCD) technology. For example, Dispatch Source Timer belongs to GCD technology, and the created timer is a timer that encapsulates Dispatch Source Timer.

[0056] Step 130: Establish a follow-stop relationship between the timer and the tracking target.

[0057] After creating a timer, establish a follow-stop relationship between the timer and the tracking target. The follow-stop relationship between the timer and the tracking target means that the release or stop of the timer will cause the tracking target to release or stop.

[0058] Step 140: When the tracking target is released, based on the follow-stop relationship, stop and release the timer.

[0059] When the tracking target is released, the timer will automatically stop and release based on the follow stop relationship.

[0060] In summary, the timer operation method provided in this embodiment is that a tracking target can be set in the configuration information of the timer. When the tracking target is released, the timer will automatically stop and release based on the follow-stop relationship between the timer and the tracking target. The timer can be stopped without manual operation, thereby avoiding memory leaks caused by the cyclic execution of the timer.

[0061] In the exemplary embodiment, a follow-stop relationship between the timer and the tracking target is established through a defined release packet.

[0062] Figure 2 FIG. 1 is a flowchart of a method for operating a timer according to an exemplary embodiment. The method can be executed by a computer device. Figure 2 As shown, the operation method of the timer may include the following steps:

[0063] Step 210: Obtain configuration information of the timer, the configuration information including: tracking target.

[0064] Step 220: Create a timer based on the configuration information.

[0065] Step 230: Create a release package and add the timer into the release package.

[0066] In a possible implementation, an Objective-C class named release package is defined, and a timer can be added to the release package.

[0067] Step 240: injecting a release packet into the tracking target, so that a follow-stop relationship is established between the timer and the tracking target.

[0068] Add a timer to the release package and inject the release package into the tracking target to establish a follow-stop relationship between the tracking target and the timer.

[0069] In a possible implementation, a strong reference release package is injected into the tracking target through runtime technology.

[0070] Step 250: When the tracking target is released, stop and release the timer based on the follow-stop relationship.

[0071] In a possible implementation, when the tracking target is released, the release package injected into the tracking target is automatically released based on the ARC technology; when the release package is released, the timer in the release package is stopped and released.

[0072] ARC is a memory management mechanism that sets a rule: when an object's reference count reaches 0, it is released. Therefore, when the tracking target is released, the reference count of the release package becomes 0 and it is automatically released.

[0073] In a possible implementation manner, stopping and releasing the timer in the release package is implemented based on the dealloc function of the release package.

[0074] Among them, the dealloc function is a function used to release memory.

[0075] Exemplary, with reference to Figure 3,For the timer's follow-stop function, the process includes the following: first, add the timer to the release package, then inject the release package into the tracking target, when the tracking target is released, the release package is released, and finally stop the timer in the dealloc of the release package.

[0076] In summary, the timer operation method provided in this embodiment defines a release package, adds a timer in the release package, and injects the release package into the tracking target, thereby establishing a follow-stop relationship between the tracking target and the timer, thereby ensuring the implementation of the follow-stop function of the timer.

[0077] In the exemplary embodiment, a dynamic period function is introduced for the timer.

[0078] Figure 4 FIG. 1 is a flowchart of a method for operating a timer according to an exemplary embodiment. The method can be executed by a computer device. Figure 4 As shown, the operation method of the timer may include the following steps:

[0079] Step 410: Obtain configuration information of the timer, which includes: tracking target and dynamic period code block.

[0080] The dynamic period code block is a code block used to configure a dynamic period for the timer.

[0081] Step 420: Create a timer based on the configuration information.

[0082] Step 430: Establish a follow-stop relationship between the timer and the tracking target.

[0083] The follow-stop relationship is used to indicate the release of the timer and the release of the tracking target.

[0084] Step 440: When the tracking target is released, stop and release the timer based on the follow-stop relationship.

[0085] Step 450: When the timer is triggered, the updated trigger interval is obtained through the dynamic period code block.

[0086] Step 460: Trigger the timer again based on the updated trigger interval.

[0087] Each time the timer is triggered, the timer obtains the trigger interval from the next timer trigger through the dynamic period code block, thereby dynamically updating the trigger interval of the timer.

[0088] It should be understood that based on the dynamic cycle function, the trigger interval of each timer can be customized. In scenarios such as heartbeat detection and network timeout reconnection, the trigger interval of the timer can be changed according to the current number of triggers.

[0089] For example, in the scenario of network timeout and reconnection, based on the dynamic period function provided by this application, it can be set to re-request the network every 1, 3, 5, 7, or 9 seconds.

[0090] Exemplary, with reference to Figure 5 For the dynamic cycle function of the timer, the following process is included: create a new timer; calculate the trigger time of the timer through the dynamic cycle block (i.e., the dynamic cycle code block); determine whether the timer needs to be released based on the current number of triggers of the timer; if the number of triggers of the timer reaches the limit, release the timer; if the number of triggers of the timer does not reach the limit, set the trigger time; based on the set trigger time, trigger the timer again.

[0091] To sum up, the timer operation method provided in this embodiment introduces a dynamic period function for the timer, and can customize the trigger interval of each trigger of the timer. Compared with the technical solution in the prior art that the timer can only set a fixed trigger interval, it can better support scenarios where the trigger interval needs to be dynamically changed.

[0092] In the exemplary embodiment, an object binding function is introduced for the timer.

[0093] Figure 6 FIG. 1 is a flowchart of a method for operating a timer according to an exemplary embodiment. The method can be executed by a computer device. Figure 6 As shown, the operation method of the timer may include the following steps:

[0094] Step 610: Obtain configuration information of the timer, the configuration information including: tracking target.

[0095] Step 620: Create a timer based on the configuration information.

[0096] Step 630: Establish a follow-stop relationship between the timer and the tracking target.

[0097] The follow-stop relationship is used to indicate the release of the timer and the release of the tracking target.

[0098] Step 640: When the tracking target is released, stop and release the timer based on the follow-stop relationship.

[0099] Step 650: Establish a mapping relationship between the object and the timer.

[0100] In a possible implementation, the object is converted into a string; the timer is stored in a hash table, and the key of the timer in the hash table is a string, thereby establishing a mapping relationship between the object and the timer.

[0101] In a possible implementation, a memory address of the object is obtained; and the memory address is used as the converted string, thereby converting the object into a string.

[0102] That is, the memory address of the object is used as the keyword, and the keyword is mapped to a unique timer using a hash table, thereby realizing the function of object binding timer.

[0103] Step 660: Query the timer based on the mapping relationship.

[0104] Since the timer is bound to the object, when a timer query is needed, the object can be used as a parameter to find the timer bound to the object based on the mapping relationship.

[0105] In the embodiments of the present application, an object binding function is introduced for the timer, eliminating the need for the object to hold the timer. Since an object holding a timer requires declaring the timer in the object's code implementation, which requires a large amount of code, modifying the relationship between the object and the timer and binding the object to the timer can reduce the amount of code required during development.

[0106] Exemplary, with reference to Figure 7 ,For the object binding function of the timer, the following process is included: operate the timer through the object; determine whether to create a timer; if the timer is being created, use the memory address of the object as the key, map it to the timer using a hash table, and then determine whether the timer has expired. If the timer has expired, delete the record in the hash table; if the timer is not being created, use the memory address of the object as the key, search the timer from the hash table, determine whether the timer exists in the hash table, if the timer exists, operate the timer, and then determine whether the timer has expired. If the timer has expired, delete the record in the hash table.

[0107] In summary, the timer operation method provided in this embodiment introduces an object binding function for the timer, so that the object does not need to hold the timer, which can reduce the amount of code during development.

[0108] It can be seen from the above embodiments that based on the technical solution provided by this application, the timer can support the following functions: follow-up stop, object binding, and dynamic cycle.

[0109] For the timer shown in the embodiment of the present application, its architecture can be as follows: Figure 8 As shown, it includes: management module, configuration module, timer module and release module. The description of each module is as follows:

[0110] The management module provides timer-related functions and manages the timer's life cycle. It is the only external interface.

[0111] The configuration module provides relevant configuration supported by the timer;

[0112] The timer module implements relevant functions of the timer;

[0113] The release module implements the follow-stop function of the timer.

[0114] It should be noted that the above method embodiments can be implemented alone or in combination, and the present application does not limit this.

[0115] Figure 9 is a structural block diagram of an operation device of a timer according to an exemplary embodiment. The device comprises:

[0116] The configuration information acquisition module 901 is configured to acquire configuration information of the timer, wherein the configuration information comprises a tracking target.

[0117] The timer creation module 902 is configured to create the timer based on the configuration information.

[0118] The follow-stop relationship establishment module 903 is configured to establish a follow-stop relationship between the timer and the tracking target, wherein the follow-stop relationship is used to indicate release of the timer, which follows release of the tracking target.

[0119] The timer release module 904 is configured to stop and release the timer based on the follow-stop relationship when the tracking target is released.

[0120] In a possible implementation, the follow-stop relationship establishment module 903 is configured to:

[0121] establish a release package, and add the timer into the release package;

[0122] inject the release package into the tracking target, so that the timer and the tracking target have the follow-stop relationship.

[0123] In a possible implementation, the timer release module 904 is configured to:

[0124] based on an automatic reference counting (ARC) technology, automatically release the release package injected into the tracking target when the tracking target is released;

[0125] stop and release the timer in the release package when the release package is released.

[0126] In a possible implementation, the configuration information further comprises a dynamic period code block.

[0127] The apparatus further comprises a trigger interval updating module;

[0128] The trigger interval updating module is configured to, when the timer is triggered, acquire an updated trigger interval through the dynamic period code block; and trigger the timer again based on the updated trigger interval.

[0129] In a possible implementation, the apparatus further comprises an object binding module.

[0130] The object binding module is configured to establish a mapping relationship between an object and the timer; and query the timer based on the mapping relationship.

[0131] In a possible implementation, the object binding module is configured to convert the object into a string; and store the timer in a hash table, wherein a key of the timer in the hash table is the string.

[0132] In a possible implementation, the object binding module is configured to acquire a memory address of the object; and use the memory address as the converted string.

[0133] It should be noted that the operation apparatus of the timer provided in the above embodiments is only used as an example for the division of the above functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.

[0134] Please refer to Figure 10 which is a schematic diagram of a computer device according to an exemplary embodiment of the present application. The controller comprises a memory and a processor. The memory is configured to store a computer program. The computer program is executed by the processor to implement the operation method of the timer described above.

[0135] The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.

[0136] The memory, as a kind of non-transient computer readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiments of the application. The processor executes various functions and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, implements the method in the above method embodiments.

[0137] The memory can include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; and the data storage area can store data created by the processor and the like. In addition, the memory can include a high-speed random access memory, and can also include a non-transient memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transient solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0138] In an exemplary embodiment, a computer readable storage medium for storing at least one computer program is also provided, the at least one computer program is loaded and executed by the processor to implement all or part of the steps in the above method. For example, the computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a magnetic tape, a floppy disk and an optical data storage device, etc.

[0139] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the application be limited only by the scope of the claims, which will be construed in light of this specification and the appended claims to encompass any and all variations that fall within the scope of the application. Both the specification and the examples are illustrative of the application and are intended to be construed in light of this disclosure and to encompass any and all changes in the field of art that would be within the scope of the claims. Neither the specification nor the examples are to be considered restrictive.

[0140] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be defined only by the appended claims, and equivalents thereof.

Claims

1. A method for operating a timer, characterized in that: The method comprises: Obtaining configuration information of a timer, wherein the configuration information includes: a tracking target and a dynamic period code block; Based on the configuration information, create the timer; Establishing a follow-stop relationship between the timer and the tracking target, wherein the follow-stop relationship is used to indicate that the release of the timer follows the release of the tracking target; When the tracking target is released, based on the follow-stop relationship, stopping and releasing the timer; The establishing of the follow-stop relationship between the timer and the tracking target includes: establishing a release package, adding the timer to the release package; and injecting the release package into the tracking target, so that the timer and the tracking target have the follow-stop relationship.

2. The method according to claim 1, characterized in that When the tracking target is released, stopping and releasing the timer based on the follow-stop relationship includes: When the tracking target is released, the release package injected into the tracking target is automatically released based on the automatic reference counting (ARC) technology; When the release packet is released, the timer in the release packet is stopped and released.

3. The method according to any one of claims 1 or 2, characterized in that The method further comprises: When the timer is triggered, obtaining an updated trigger interval through the dynamic period code block; The timer is triggered again based on the updated triggering interval.

4. The method according to any one of claims 1 or 2, characterized in that The method further comprises: Establishing a mapping relationship between the object and the timer; The timer is queried based on the mapping relationship.

5. The method according to claim 4, characterized in that The establishing of a mapping relationship between the object and the timer includes: Convert the object to a string; The timer is stored in a hash table, and the key of the timer in the hash table is the character string.

6. The method according to claim 5, characterized in that The converting the object into a string includes: Get the memory address of the object; The memory address is used as the converted character string.

7. A timer operating device, characterized in that: The device comprises: A configuration information acquisition module is used to obtain configuration information of the timer, wherein the configuration information includes: a tracking target and a dynamic period code block; A timer creation module, configured to create the timer based on the configuration information; a follow-stop relationship establishing module, configured to establish a follow-stop relationship between the timer and the tracking target, wherein the follow-stop relationship is used to indicate that the release of the timer follows the release of the tracking target; a timer releasing module, configured to stop and release the timer based on the follow-stop relationship when the tracking target is released; The follow-stop relationship establishing module is configured to: establish a release package, add the timer into the release package; and inject the release package into the tracking target, so that the follow-stop relationship exists between the timer and the tracking target.

8. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the timer operation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the timer operation method according to any one of claims 1 to 6.