when I need to use ..../bits and when ..../sys
Neither. Just use:
This will source
/usr/include/time.h, which sources the
bits one directly, and probably indirectly sources the
sys one too. In any case, the standard C time functions are declared in the toplevel header and for predictable results, stick with that.
The purpose of this hierarchy is that
/usr/include/time.h can be the same regardless of hardware architecture, and the implementation specific bits are further down so user code does not have to be concerned with them. This is part of what makes C a high level portable language.