Method for counting use duration of terminal, terminal and storage medium

The invention provides a method for counting the use duration of a terminal, the terminal and a storage medium. The method comprises the following steps: step S100, customizing a statistical event, monitoring the statistical event, recording an event type, creating a timestamp and a name, and establ...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: MEI JUNMING, JIANG NAN, LI MING
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention provides a method for counting the use duration of a terminal, the terminal and a storage medium. The method comprises the following steps: step S100, customizing a statistical event, monitoring the statistical event, recording an event type, creating a timestamp and a name, and establishing an event record; step S200, determining a statistical time range, obtaining event records in the time range, and establishing a duration calculation stack; s300, when it is judged that the stack is empty, according to the time axis sequence, events representing the starting state in the event records are stored in the stack, and a corresponding event creating time stamp is recorded as real starting time a; when an event representing a stop state in the event record occurs, a stack top node is deleted, and when it is judged that the stack is empty after the stack top node is deleted, the time stamp of the event is recorded as real end time b; recording the use duration of the current statistical event as b-a;