Timing method and device
A timing and timer technology, applied in the computer field, can solve problems such as the complexity of development programs, the high cost of timer time, and the difficulty of program maintenance, so as to achieve the effects of reducing complexity, reducing maintenance difficulty, and simplifying use
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0047] An embodiment of the present invention provides a timing method.
[0048] During Android development, timers are often used. There are roughly four types of timers provided by Android:
[0049](1), using the timing method of the Handler (processor) and the sleep function sleep() of the thread
[0050] Handler is a class used for communication between the main thread and sub-threads. It can open a sub-thread, execute the sleep function sleep() in the sub-thread, and notify the main thread through the Handler that the timer times out after the sleep time is completed.
[0051] When using this timer, you can adjust the timing length by adjusting the sleep time of the sleep function sleep(), so as to realize the timing function. However, if the sleep time is too long, it may cause a memory leak, resulting in the inability to release part of the memory of the application. In addition, when the system enters the dormant state, the timer cannot execute the timing task becau...
Embodiment 2
[0092] see Figure 4 , an embodiment of the present invention provides a timing device, configured to implement the timing method provided in Embodiment 1 above. Specifically, the device includes:
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com