Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Why Cscript can not complile gettimeofday function?

0 votes
59 views
Hi, I am trying to use function gettimeof day in my Cscript function to measure the execution time of my code. I include sys/time.h and time.h in code declearation part, but 'error: implicit declaration of function 'gettimeofday'' occur when compile the code. I find the declearation of gettimeofday in time.h and my system is WIN 11,  so I am quite confused why it is not working.
asked Jul 7 by Muyu (12 points)

1 Answer

0 votes
'gettimeofday()' is a system function that is found on Linux and MacOS. Windows does not implement this system function.
answered Jul 8 by Oliver Schwartz (626 points)
Okay, I understand. Thank you for pointing out the mistake.
...