dsmi_get_system_time
Prototype
int dsmi_get_system_time(int device_id, unsigned int *ntime_stamp)
Description
Obtains the system time.
For the Ascend 310 AI Processor, this API supports mini modules (EP) and standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID For the Ascend 310 AI Processor, the value range is 0–63. Obtain the actual device ID by calling dsmi_list_device. |
ntime_stamp |
Output |
Timestamp, formatted as 00:00:00, January 1,1970 |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; int time = 0; ret = dsmi_get_system_time (0, &time); if(ret != 0) { //To-do: records logs. return ret; } ...