On Thu, Aug 25, 2011 at 1:11 AM, विदुर <[email protected]> wrote: > Hi All, > > I am wondering to learn about how the system clock (or software clock > or kernel clock) represents/stores time. Particularly, I am searching > for ways to represent one day time (24 hours = 24 * 60 * 60 seconds) > in an storage efficient way i.e. by using as less as possible number > of bits. > I think some operating system books have the explanations but I am not > able to recall it. Some insights or links to relevant sources/links > are highly appreciated. > > Thank You >
all posix complaint system uses gettimeofday(). see "man gettimeofday" or related functions. it gives number of seconds since EPOCH (00:00:00 UTC, January 1, 1970). but i did not understand where you are trying to store it. currently it can be stored in "sizeof(struct timeval)" bytes. or just time_t if you just need seconds. may i know what exactly are you trying to do? -- FOSS Nepal mailing list: [email protected] http://groups.google.com/group/foss-nepal To unsubscribe, e-mail: [email protected] Mailing List Guidelines: http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines Community website: http://www.fossnepal.org/
