when I include time.h, I got
: fatal error: time.h: No such file or directory
please help! thanks
Exactly what the message says - it can't find that file!
2 possible reasons:
To fix No 2, you need to correctly configure your Include Paths; you haven't said what toolchain you're using, so it's impossible to give specific instructions - but searching for "Include Path" in the documentation should get you there...
Don't you have to tell us which toolchain and version you are using?
When you do that and search the forums for time.h support in GCC, what threads do you find?
From 2008: https://www.avrfreaks.net/comment...
I seem to recall some threads about at least some support added for AVR8 targets.
You can put lipstick on a pig, but it is still a pig.
I've never met a pig I didn't like, as long as you have some salt and pepper.
time.h was added to avr-gcc in AVR-LibC 2.0 which (I think) started to be used around about v 4.8 so if you have a compiler from before then (for example WinAVR was 4.3) it won't have it.
Then again maybe it's not even gcc?
Studio 7 has 4.9.2 - it definitely has time.h
© 2021 Microchip Technology Inc.