Menu

Duration Events

Step 1: Create Duration Event

      Call eventStart to start timing for an event. Configure the name of the event, and event properties to report. When the event comes to an end, a "_duration" property will automatically be added for this event (unit: millisecond). It should be noted that there can only be one timing task for the same event.

Function

export function eventStart(eventName:string);
ParameterDescriptionTypeRequired
eventNameDeveloper custom event nameStringYes

Sample Code

  let eventName = "time_event_name";
  SolarEngine.eventStart(eventName);

Step 2: Report Duration Event

       Call eventFinish to report duration event:

Function

export function eventEnd(eventName:string,properties:Object);
ParameterDescriptionTypeRequired
eventNameCustom duration event namestringYes
propertiesDuration event custom propertiesObjectNo

Sample Code

let eventName = "your_event_name";
let properties = { ... }
SolarEngine.eventEnd(eventName,properties);

Note:

       When reporting the preset event _appEnd, the duration starting from the last _appStart will be reported by default. That is, the duration of an exit event does not need to be configured to start timing, and will be assigned a value by default.


Previous
Custom Events
Next
First-Time Event
Last modified: 2024-12-05Powered by