Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I am new to C and linux.
I am trying to create a system time, set it, and get it.
I need to be able to set the time as seconds epoch. I.e. a 32-bit value of seconds. The function will recieve the time as an uint32.
I need to be able to get the time in seconds too.
In addition, I need to be able to set and get the milliseconds of this time.
I have looked for a way of doing that a lot. But, the more I look, the more confused I get
I have looked at time_t and timeb. Milliseconds are in timeb but not in time_t.
Is there a simple way of doing that?
Please let me know if you want to see what coding I have done so far.
0 · ·