Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alink_os: Warning: system_get_time is deprecated #13

Closed
nicola-lunghi opened this issue Oct 15, 2018 · 1 comment
Closed

alink_os: Warning: system_get_time is deprecated #13

nicola-lunghi opened this issue Oct 15, 2018 · 1 comment

Comments

@nicola-lunghi
Copy link

/home/user/esp-iot-solution/components/platforms/alink/adaptation/alink_os.c:273:5: warning: 'system_get_time' is deprecated [-Wdeprecated-declarations]
     return system_get_time() / 1000;
     ^
In file included from /home/user/esp-iot-solution/components/platforms/alink/adaptation/alink_os.c:25:0:
/home/user/esp-iot-solution/submodule/esp-idf/components/esp32/include/esp_system.h:96:10: note: declared here
 uint32_t system_get_time(void)  __attribute__ ((deprecated));
          ^
@allanchen24
Copy link

@nicola-lunghi Please replace return system_get_time() / 1000; with the code below:

    struct timeval now;
    gettimeofday(&now, NULL);
    return (now.tv_sec * 1000000 + now.tv_usec) / 1000;

Now the system_get_time() is deprecated, and use gettimeofday() to get system time.
We will fix this issue later. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants