Changeset 44611 for titan/titan/mipselport.h
- Timestamp:
- 01/25/20 22:35:29 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/mipselport.h
r44556 r44611 1682 1682 } 1683 1683 1684 int setrtctimemips()1685 {1686 char *rtctimedev = NULL, *tmpstr = NULL;1687 int ret = 0;1688 // int value = 0;1689 1690 time_t t = time(NULL);1691 struct tm *local = localtime(&t);1692 time_t rawlocal = mktime(local);1693 1694 t = time(NULL);1695 struct tm *gmt = gmtime(&t);1696 time_t rawgmt = mktime(gmt);1697 1698 int offset = difftime(rawlocal, rawgmt);1699 1700 tmpstr = oitoa(offset);1701 rtctimedev = getconfig("rtctime_offsetdev", NULL);1702 if(rtctimedev != NULL)1703 ret = writesys(rtctimedev, tmpstr, 0);1704 else1705 ret = writesys("/proc/stb/fp/rtc_offset", tmpstr, 0);1706 free(tmpstr); tmpstr = NULL;1707 rtctimedev = NULL;1708 1709 if(ret == 0)1710 {1711 tmpstr = oitoa(rawlocal);1712 rtctimedev = getconfig("rtctimedev", NULL);1713 if(rtctimedev != NULL)1714 ret = writesys(rtctimedev, tmpstr, 0);1715 else1716 ret = writesys("/proc/stb/fp/rtc", tmpstr, 0);1717 free(tmpstr); tmpstr = NULL;1718 rtctimedev = NULL;1719 }1720 return ret;1721 }1722 1723 1684 #ifdef CONFIG_ION 1724 1685 void SetMode()
Note: See TracChangeset
for help on using the changeset viewer.