CN104166585A - Terminal timer control method and system - Google Patents
Terminal timer control method and system Download PDFInfo
- Publication number
- CN104166585A CN104166585A CN201410408125.8A CN201410408125A CN104166585A CN 104166585 A CN104166585 A CN 104166585A CN 201410408125 A CN201410408125 A CN 201410408125A CN 104166585 A CN104166585 A CN 104166585A
- Authority
- CN
- China
- Prior art keywords
- timer
- time
- virtual
- terminal
- out time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Measurement Of Predetermined Time Intervals (AREA)
Abstract
The invention discloses a terminal timer control method and system. Corresponding virtual timers are built according to a timer currently running in a terminal, the virtual timers are sequenced, all the timers except the timer corresponding to the first virtual timer are switched off, then the timeout time difference of each timer and the previous timer connected with the timer serves as the timeout duration of each timer, two ends of the timeout durations are overlapped, object time of all the timers is unchanged, and when the current timer is overtime, the next adjacent timer is started. Accordingly, the number of the timer currently running is only one, the situation that multiple timers run at the same time is avoided, processor resources are saved for the terminal, and the phenomenon that the terminal is not qualified never occurs.
Description
Technical field
The present invention relates to timer, in particular terminal timer control method and system.
Background technology
Timer in terminal is a multitask timed reminding software, it support comprehensively WINDOWS 9X/ME/NT/2K/XP on time executive routine, play sound, shutdown, standby, dial, disconnect, close the operations such as display.
Timer can be carried out corresponding task after the time of setting arrives, and is one of module the most frequently used in terminal, and in terminal, a lot of functions all need to use timer.
But in prior art, when terminal is set with multiple timer, these timers are all in running status simultaneously, the processor resource of occupied terminal is more.And the timer quantity that terminal handler can bear is limited, if move a lot of timers simultaneously, terminal likely cannot be competent at.
Therefore prior art exists defect, have much room for improvement.
Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide terminal timer control method and system, the each time point of terminal only has at most a timer operation, and solution terminal is moved the more problem of processor resource of multiple timer occupied terminals simultaneously.
For reaching above-mentioned purpose, the invention provides following technical scheme:
Terminal timer control method, comprises the following steps:
A, obtain the time-out time of current all timers and each timer, described time-out time is the duration of object time of setting apart from timer of current time;
B, the establishment virtual timer corresponding with timer;
C, arrange virtual timer according to the ascending order of the time-out time of virtual timer, and close timer corresponding to other virtual timers outside the virtual timer of arranging first;
D, reset mistiming of the time-out time of time-out time that the time-out time of virtual timer is described virtual timer and adjacent previous virtual timer;
E, when starting adjacent timer corresponding to next virtual timer after the timer expiry of current unlatching.
Described terminal timer control method, wherein, also comprises step:
In the time deleting a certain timer, delete the virtual timer corresponding with it, then perform step C.
Described terminal timer control method, wherein, also comprises step:
In the time of a newly-increased timer, create a virtual timer corresponding with newly-increased timer, then perform step C.
Described terminal timer control method, wherein, also comprises step:
In the time resetting a certain timer, the virtual timer corresponding with it done to equivalent modifications, then perform step C.
Described terminal timer control method, wherein, also comprises step:
When after a certain timer expiry, automatically described timer and corresponding virtual timer are deleted.
Corresponding with said method, the present invention also provides terminal Timer Controlling system, wherein, also comprises:
Timer acquisition module, for obtaining the time-out time of current all timers and each timer, described time-out time is the duration of current time apart from the object time of timer setting;
Virtual timer creation module, for creating the virtual timer corresponding with timer;
Sequence and closing module, for arranging virtual timer according to the ascending order of the time-out time of virtual timer, and close timer corresponding to other virtual timers outside the virtual timer of arranging first;
Time-out time resets module, for resetting mistiming of time-out time of time-out time that the time-out time of virtual timer is described virtual timer and adjacent previous virtual timer;
Start module, for starting adjacent timer corresponding to next virtual timer after the timer expiry when current unlatching.
Described terminal Timer Controlling system, wherein, also comprises:
Removing module, for delete the virtual timer corresponding with it in the time deleting a certain timer, then starts sequence and closing module.
Described terminal Timer Controlling system, wherein, also comprises:
Creation module, for create a virtual timer corresponding with newly-increased timer in the time increasing a timer newly, then starts sequence and closing module.
Described terminal Timer Controlling system, wherein, also comprises:
Reset module, for the virtual timer corresponding with it being done to equivalent modifications in the time resetting a certain timer, then start sequence and closing module.
Described terminal Timer Controlling system, wherein, also comprises:
Automatically removing module, for when after a certain timer expiry, deletes described timer and corresponding virtual timer automatically.
Compared with prior art, terminal timer control method provided by the present invention and system, according to virtual timer corresponding to the current timer creation of moving in terminal, virtual timer is sorted, close other all timers except timer corresponding to the virtual timer of sequence first, then the poor time-out time as timer of time-out time with the last timer being connected using timer, the two-end-point of these time-out times overlaps, the object time of all timers is constant, starts next adjacent timer after current timer expiry.The timer of current like this operation only has one, has avoided multiple timers to move simultaneously, and for terminal has been saved processor resource, and terminal there will not be incompetent phenomenon.
Brief description of the drawings
Fig. 1 is terminal timer control method process flow diagram of the present invention.
Fig. 2 is terminal Timer Controlling system construction drawing of the present invention.
Embodiment
The invention provides terminal timer control method and system, for making object of the present invention, technical scheme and effect clearer, clear and definite, referring to accompanying drawing examples, the present invention is described in more detail.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Refer to Fig. 1, Fig. 1 is terminal timer control method process flow diagram of the present invention.As shown in Figure 1, terminal timer control method of the present invention, comprising:
Step 101, obtain the time-out time of current all timers and each timer, described time-out time is the duration of object time of setting apart from timer of current time.First explanation a bit, timer of the present invention is software, in prior art, the all corresponding time-out time of each timer, time-out time refers to the duration of object time that current time is set apart from timer, that is to say, existing timer is all as the criterion with current time, each timer is carried out to technology, and multiple timers move simultaneously.This step is obtained the time-out time of current all timers and each timer, can obtain all timers here.Preferred version is, only obtains the timer of current unlatching, and timer has open and close two states, and timer shows that in closed condition user does not need this timer to open, just in order to retain this timer to open next time.Only obtain the timer of current unlatching, control the timer of current unlatching, do not change user's setting.
Step 102, the establishment virtual timer corresponding with timer.Create virtual timer, the establishment of described virtual timer is according to the above-mentioned timer obtaining, as the time-out time that has obtained timer 1 is that 16 seconds, the time-out time of timer 2 are that the time-out time of 5 seconds and timer 3 is 8 seconds, the virtual timer creating is virtual timer 1, and time-out time is 16 seconds; Virtual timer 2, time-out time is 5 seconds; Virtual timer 3, time-out time is 8 seconds.Here need explanation a bit, create the virtual timer corresponding with timer, described correspondence refer to state and the object time identical, described state is identical refers to that timer opens and closes with corresponding virtual timer simultaneously, and the described object time is identical refers to that timer and corresponding virtual timer possess identical time point when overtime.For making the present invention more cheer and bright, now virtual timer is listed as follows:
Virtual timer 1 | 16 seconds |
Virtual timer 2 | 5 seconds |
Virtual timer 3 | 8 seconds |
Step 103, arrange virtual timer according to the ascending order of the time-out time of virtual timer, and close timer corresponding to other virtual timers outside the virtual timer of arranging first.On the basis of the virtual timer creating, according to ascending order, virtual timer is sorted, as the virtual timer 1 of above-mentioned establishment, virtual timer 2 and virtual timer 3, after sequence, virtual timer 2 ranked first, virtual timer 3 ranked second, and virtual timer 1 ranked third.Then close timer corresponding to other virtual timers outside the virtual timer of arranging first, as virtual timer, virtual timer 2 and virtual timer 3, after sorted, virtual timer 3 and virtual timer 1 are closed.For making the present invention more cheer and bright, now the virtual timer after arranging is listed as follows:
Virtual timer 2 | 5 seconds |
Virtual timer 3 | 8 seconds |
Virtual timer 1 | 16 seconds |
Step 104, reset mistiming of the time-out time of time-out time that the time-out time of virtual timer is described virtual timer and adjacent previous virtual timer.This step resets the time-out time of virtual timer, the time-out time of virtual timer is set as to the mistiming of the time-out time of described virtual timer and the time-out time of adjacent previous virtual timer, virtual timer 1 as mentioned above, virtual timer 2 and virtual timer 3, because virtual timer 2 ranked first, before it, there is no virtual timer, therefore the time-out time of the virtual timer ranked first is constant, the time-out time of the virtual timer 3 ranked second is 8 seconds, the time-out time for virtual timer 3 of its time-out time after resetting deducts the time-out time of virtual timer 2 for 8 seconds, its mistiming is 3 seconds, in like manner, the time-out time that can obtain virtual timer 1 is 8 seconds.So, the time-out time of the virtual timer 2 after resetting is that 5 seconds, the time-out time of virtual timer 3 are that the time-out time of 3 seconds and virtual timer 1 is 8 seconds.Because the time-out time resetting obtains by subtracting each other, the time period that these time-out times do not overlap, two adjacent virtual timers only possess identical time end points.For making the present invention more cheer and bright, the existing virtual timer resetting after time-out time is listed as follows:
Virtual timer 2 | 5 seconds | 5 seconds |
Virtual timer 3 | 8 seconds | 3 seconds |
Virtual timer 1 | 16 seconds | 8 seconds |
Step 105, when starting adjacent timer corresponding to next virtual timer after the timer expiry of current unlatching.The timer of current unlatching is the virtual timer of arranging first, and the timer expiry of current unlatching has arrived the timing of the timer setting of current unlatching, opens adjacent next virtual timer, and then opens corresponding timer.
Described terminal timer control method, preferred, also comprise step: in the time deleting a certain timer, delete the virtual timer corresponding with it, then perform step 103.As delete above-mentioned timer 1, can delete the virtual timer corresponding with timer 11, then perform step 103, arrange virtual timer according to the order that the time-out time of virtual timer is ascending, and close timer corresponding to other virtual timers outside the virtual timer of arranging first.For making the present invention more cheer and bright, existing other virtual timers by deletion virtual timer 1 are listed as follows:
Virtual timer 2 | 5 seconds |
Virtual timer 3 | 8 seconds |
Described terminal timer control method, preferred, also comprise step: in the time of a newly-increased timer, create a virtual timer corresponding with newly-increased timer, then perform step 103.As increase timer 8, time-out time is 20, create a virtual timer 8 corresponding with newly-increased timer, then perform step 103, arrange virtual timer according to the order that the time-out time of virtual timer is ascending, and close timer corresponding to other virtual timers outside the virtual timer of arranging first.For making the present invention more cheer and bright, existing other virtual timers by increase virtual timer 8 are listed as follows:
Virtual timer 1 | 16 seconds |
Virtual timer 2 | 5 seconds |
Virtual timer 3 | 8 seconds |
Virtual timer 8 | 20 seconds |
Described terminal timer control method, preferred, also comprise step: in the time resetting a certain timer, the virtual timer corresponding with it done to equivalent modifications, then perform step 103.As timer 3 is revised, the time-out time of timer 3 is set as to 90 seconds, the virtual timer corresponding with timer 33 done to equivalent modifications, then perform step 103, arrange virtual timer according to the order that the time-out time of virtual timer is ascending, and close timer corresponding to other virtual timers outside the virtual timer of arranging first.For making the present invention more cheer and bright, the existing virtual timer of having revised timer 3 is listed as follows:
Virtual timer 1 | 16 seconds |
Virtual timer 2 | 5 seconds |
Virtual timer 3 | 90 seconds |
Described terminal timer control method, preferred, also comprise step: when after a certain timer expiry, automatically described timer and corresponding virtual timer are deleted.After as overtime in the timer 2 of arranging first virtual timer 2 correspondences, virtual timer 2 is deleted, for making the present invention more cheer and bright, the existing virtual timer of having deleted timer 2 is listed as follows:
Virtual timer 3 | 8 seconds | 3 seconds |
Virtual timer 1 | 16 seconds | 8 seconds |
Refer to Fig. 2, Fig. 2 is terminal Timer Controlling system construction drawing of the present invention.As shown in Figure 2, the present invention also provides terminal Timer Controlling system, wherein, also comprises:
Timer acquisition module 202, for obtaining the time-out time of current all timers and each timer, the duration of the described time-out time object time that to be current time set apart from timer, as detailed above;
Virtual timer creation module 203, for creating the virtual timer corresponding with timer, as detailed above;
Sequence and closing module 205, for arranging virtual timer according to the ascending order of the time-out time of virtual timer, and close timer corresponding to other virtual timers outside the virtual timer of arranging first, as detailed above;
Time-out time resets module 201, for resetting mistiming of time-out time of time-out time that the time-out time of virtual timer is described virtual timer and adjacent previous virtual timer, as detailed above;
Start module 204, for starting adjacent timer corresponding to next virtual timer after the timer expiry when current unlatching, as detailed above.
Described terminal Timer Controlling system, preferred, also comprise:
Removing module, for delete the virtual timer corresponding with it in the time deleting a certain timer, then starts sequence and closing module, as detailed above.
Described terminal Timer Controlling system, preferred, also comprise:
Creation module, for create a virtual timer corresponding with newly-increased timer in the time increasing a timer newly, then starts sequence and closing module, as detailed above.
Described terminal Timer Controlling system, preferred, also comprise:
Reset module, for the virtual timer corresponding with it being done to equivalent modifications in the time resetting a certain timer, then start sequence and closing module, as detailed above.
Described terminal Timer Controlling system, preferred, also comprise:
Automatically removing module, for when after a certain timer expiry, deletes described timer and corresponding virtual timer, as detailed above automatically.
In sum, terminal timer control method provided by the present invention and system, according to virtual timer corresponding to the current timer creation of moving in terminal, virtual timer is sorted, close other all timers except timer corresponding to the virtual timer of sequence first, then the poor time-out time as timer of time-out time with the last timer being connected using timer, the two-end-point of these time-out times overlaps, the object time of all timers is constant, starts next adjacent timer after current timer expiry.The timer of current like this operation only has one, has avoided multiple timers to move simultaneously, and for terminal has been saved processor resource, and terminal there will not be incompetent phenomenon.
Should be understood that, application of the present invention is not limited to above-mentioned giving an example, and for those of ordinary skills, can be improved according to the above description or convert, and all these improvement and conversion all should belong to the protection domain of claims of the present invention.
Claims (10)
1. terminal timer control method, is characterized in that, comprises the following steps:
A, obtain the time-out time of current all timers and each timer, described time-out time is the duration of object time of setting apart from timer of current time;
B, the establishment virtual timer corresponding with timer;
C, arrange virtual timer according to the ascending order of the time-out time of virtual timer, and close timer corresponding to other virtual timers outside the virtual timer of arranging first;
D, reset mistiming of the time-out time of time-out time that the time-out time of virtual timer is described virtual timer and adjacent previous virtual timer;
E, when starting adjacent timer corresponding to next virtual timer after the timer expiry of current unlatching.
2. terminal timer control method according to claim 1, is characterized in that, also comprises step:
In the time deleting a certain timer, delete the virtual timer corresponding with it, then perform step C.
3. terminal timer control method according to claim 1, is characterized in that, also comprises step:
In the time of a newly-increased timer, create a virtual timer corresponding with newly-increased timer, then perform step C.
4. terminal timer control method according to claim 1, is characterized in that, also comprises step:
In the time resetting a certain timer, the virtual timer corresponding with it done to equivalent modifications, then perform step C.
5. terminal timer control method according to claim 1, is characterized in that, also comprises step:
When after a certain timer expiry, automatically described timer and corresponding virtual timer are deleted.
6. terminal Timer Controlling system, is characterized in that, comprising:
Timer acquisition module, for obtaining the time-out time of current all timers and each timer, described time-out time is the duration of current time apart from the object time of timer setting;
Virtual timer creation module, for creating the virtual timer corresponding with timer;
Sequence and closing module, for arranging virtual timer according to the ascending order of the time-out time of virtual timer, and close timer corresponding to other virtual timers outside the virtual timer of arranging first;
Time-out time resets module, for resetting mistiming of time-out time of time-out time that the time-out time of virtual timer is described virtual timer and adjacent previous virtual timer;
Start module, for starting adjacent timer corresponding to next virtual timer after the timer expiry when current unlatching.
7. terminal Timer Controlling system according to claim 6, is characterized in that, also comprises:
Removing module, for delete the virtual timer corresponding with it in the time deleting a certain timer, then starts sequence and closing module.
8. terminal Timer Controlling system according to claim 6, is characterized in that, also comprises:
Creation module, for create a virtual timer corresponding with newly-increased timer in the time increasing a timer newly, then starts sequence and closing module.
9. terminal Timer Controlling system according to claim 6, is characterized in that, also comprises:
Reset module, for the virtual timer corresponding with it being done to equivalent modifications in the time resetting a certain timer, then start sequence and closing module.
10. terminal Timer Controlling system according to claim 6, is characterized in that, also comprises:
Automatically removing module, for when after a certain timer expiry, deletes described timer and corresponding virtual timer automatically.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410408125.8A CN104166585A (en) | 2014-08-19 | 2014-08-19 | Terminal timer control method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410408125.8A CN104166585A (en) | 2014-08-19 | 2014-08-19 | Terminal timer control method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104166585A true CN104166585A (en) | 2014-11-26 |
Family
ID=51910418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410408125.8A Pending CN104166585A (en) | 2014-08-19 | 2014-08-19 | Terminal timer control method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104166585A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105162946A (en) * | 2015-06-30 | 2015-12-16 | Tcl移动通信科技(宁波)有限公司 | Alarm clock processing method based on mobile terminal, and mobile terminal |
CN109952560A (en) * | 2017-10-20 | 2019-06-28 | 深圳市汇顶科技股份有限公司 | Timing method and its device, the electronic device of virtual timer |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270156A (en) * | 2011-05-30 | 2011-12-07 | 北京华源格林科技有限公司 | Method for managing real-time embedded system timers |
US8255920B2 (en) * | 2006-03-01 | 2012-08-28 | Fujitsu Limited | Time management control method for computer system, and computer system |
CN102761541A (en) * | 2012-05-31 | 2012-10-31 | 汉柏科技有限公司 | Timer processing method and system |
-
2014
- 2014-08-19 CN CN201410408125.8A patent/CN104166585A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8255920B2 (en) * | 2006-03-01 | 2012-08-28 | Fujitsu Limited | Time management control method for computer system, and computer system |
CN102270156A (en) * | 2011-05-30 | 2011-12-07 | 北京华源格林科技有限公司 | Method for managing real-time embedded system timers |
CN102761541A (en) * | 2012-05-31 | 2012-10-31 | 汉柏科技有限公司 | Timer processing method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105162946A (en) * | 2015-06-30 | 2015-12-16 | Tcl移动通信科技(宁波)有限公司 | Alarm clock processing method based on mobile terminal, and mobile terminal |
CN109952560A (en) * | 2017-10-20 | 2019-06-28 | 深圳市汇顶科技股份有限公司 | Timing method and its device, the electronic device of virtual timer |
CN109952560B (en) * | 2017-10-20 | 2022-12-23 | 深圳市汇顶科技股份有限公司 | Timing method and device of virtual timer and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104298512B (en) | A kind of functional unit formula integrated development system based on OSGi standards | |
CN105676987A (en) | Method for shutting down background application of mobile terminal, device and mobile terminal | |
CN105373485A (en) | Memory cleaning system and method and terminal device | |
CN103595566A (en) | Method and device for detecting idle IP addresses | |
CN105093945A (en) | System and method for safely controlling smart household apparatuses based on smart cloud | |
CN104536681A (en) | Method and system for simultaneously starting a plurality of applications on basis of touch screen | |
CN108809683A (en) | Dispose the method and device of cloud application system | |
CN105282299A (en) | Application starting device and method | |
CN105487943A (en) | Method for automatically copying files to each node of cluster server | |
CN104346279A (en) | Method and device for software testing | |
CN105704758A (en) | Method and device of closing social applications based on flow monitoring | |
CN104023147B (en) | A kind of method and system that make mobile terminal stablize dormancy | |
CN106776395A (en) | A kind of method for scheduling task and device of shared cluster | |
CN104166585A (en) | Terminal timer control method and system | |
CN110794703A (en) | Intelligent scene setting method and system based on multiple trigger conditions | |
CN105653304B (en) | The switching method of operational mode, the switching device of operational mode and terminal | |
CN105095045A (en) | Method and system for monitoring background service of Android system | |
CN104954214A (en) | Method and system for improving RS485 communication expansibility | |
CN113691628A (en) | Task switching method and device, system, electronic equipment and computer medium | |
CN105843773A (en) | Automatic identification method of function extension module of embedded system | |
WO2015196805A1 (en) | Batch command execution method and apparatus | |
CN109348041B (en) | Application program networking control method and device, storage medium and terminal | |
CN204065779U (en) | A kind of remote online data update system of soft PLC module | |
CN105162946B (en) | A kind of alarm clock processing method and mobile terminal based on mobile terminal | |
CN104349506A (en) | Association management method, wireless access device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20141126 |