I’m creating a client-server application. I want to do some logging.
Server is in C. Now I’m print messages to the terminal. So I’ll probably just copy that to sprintf and add timestamp.
How can I do that timestamp?
It should probably include date, hours, minutes, seconds.
On my PC, it just prints
Check out the whole range of time related functions here
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html