feat: add NTP; fix networking bugs/regressions
This commit is contained in:
@@ -49,6 +49,7 @@ extern "C" {
|
||||
#define MTK_SYS_GETARGS 25
|
||||
#define MTK_SYS_RESET 26
|
||||
#define MTK_SYS_SHUTDOWN 27
|
||||
#define MTK_SYS_SETUNIXTIME 153
|
||||
#define MTK_SYS_GETTIME 28
|
||||
#define MTK_SYS_SOCKET 29
|
||||
#define MTK_SYS_CONNECT 30
|
||||
@@ -533,6 +534,10 @@ static inline void mtk_gettime(mtk_datetime *out) {
|
||||
_mtk_syscall1(MTK_SYS_GETTIME, (long)out);
|
||||
}
|
||||
|
||||
static inline int mtk_set_unix_time(int64_t unix_seconds) {
|
||||
return (int)_mtk_syscall1(MTK_SYS_SETUNIXTIME, (long)unix_seconds);
|
||||
}
|
||||
|
||||
static inline void mtk_settz(int offset_minutes) {
|
||||
_mtk_syscall1(MTK_SYS_SETTZ, (long)offset_minutes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user