mirror of
https://github.com/gwenhael-le-moine/x49gp.git
synced 2024-12-26 21:58:41 +01:00
commit
7d928fca72
1 changed files with 3 additions and 3 deletions
|
@ -265,10 +265,10 @@ s3c2410_rtc_read(void *opaque, target_phys_addr_t offset)
|
||||||
|
|
||||||
if (S3C2410_RTC_BCDSEC <= offset && offset <= S3C2410_RTC_BCDYEAR) {
|
if (S3C2410_RTC_BCDSEC <= offset && offset <= S3C2410_RTC_BCDYEAR) {
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
time_t t;
|
struct timeval tv;
|
||||||
|
|
||||||
t = time(0);
|
gettimeofday(&tv, NULL);
|
||||||
tm = localtime(&t);
|
tm = localtime(&tv.tv_sec);
|
||||||
|
|
||||||
switch (offset) {
|
switch (offset) {
|
||||||
case S3C2410_RTC_BCDSEC:
|
case S3C2410_RTC_BCDSEC:
|
||||||
|
|
Loading…
Reference in a new issue