Function: event_get_timestamp

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Obtains the execution end time of an event (time elapsed since the processor is started).

This API must be used together with other key APIs. The API call sequence is as follows:

Prototype

  • C Prototype
    1
    aclError aclrtEventGetTimestamp(aclrtEvent event, uint64_t *timestamp)
    
  • Python Function
    1
    timestamp, ret = acl.rt.event_get_timestamp(event)
    

Parameter Description

Parameter

Description

event

Int, event to be queried.

Return Value Description

Return Value

Description

timestamp

Int, time when the event execution ends, in microseconds.

ret

Int, 0 on success; else, failure. For details, see aclError.