[coreboot] libpayload: add gettimeofday()

Jordan Crouse jordan.crouse at amd.com
Thu Apr 17 01:44:45 CEST 2008


Add a simple gettimeofday() implementation.  If you find my math laughable,
then please fix it. :)

We don't have an OS underneath constantly correcting the time math, so this
will drift away from RTC fairly quickly.  Its good for small intervals
of time, but if you need to figure out what time it is, use the
rtc_read_clock() function (hm - mabye I should rename that localtime?)

Also, add in a NVRAM function to make sure we get a stable date value.

Please review and comment.

-- 
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtod.patch
Type: text/x-diff
Size: 8114 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080416/847193ad/attachment.bin>


More information about the coreboot mailing list