Function: event_get_timestamp
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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:
- Call acl.rt.create_event/acl.rt.create_event_with_flag to create an event.
- Call acl.rt.record_event to record the event in the stream.
- Call acl.rt.synchronize_stream to block the app until all tasks in the specified stream are complete.
- Call acl.rt.event_get_timestamp to obtain the execution time of the event.
Prototype
- C Prototype
1aclError aclrtEventGetTimestamp(aclrtEvent event, uint64_t *timestamp)
- Python Function
1timestamp, 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. |
Parent topic: Event Management