mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
Merge pull request #1814 from cesanta/ti-rtos
Improve TI-RTOS timing support
This commit is contained in:
4 files changed
+8
No files matched your search
@@ -5588,6 +5588,8 @@ uint64_t mg_millis(void) {
|
|||||||
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
||||||
#elif MG_ARCH == MG_ARCH_AZURERTOS
|
#elif MG_ARCH == MG_ARCH_AZURERTOS
|
||||||
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
|
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
|
||||||
|
#elif MG_ARCH == MG_ARCH_TIRTOS
|
||||||
|
return (uint64_t) Clock_getTicks();
|
||||||
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
||||||
return (uint64_t) k_uptime_get();
|
return (uint64_t) k_uptime_get();
|
||||||
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
||||||
|
|||||||
@@ -425,6 +425,8 @@ struct timeval {
|
|||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include <ti/sysbios/knl/Clock.h>
|
||||||
|
|
||||||
extern int SockStatus(SOCKET hSock, int request, int *results );
|
extern int SockStatus(SOCKET hSock, int request, int *results );
|
||||||
extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
|
extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include <ti/sysbios/knl/Clock.h>
|
||||||
|
|
||||||
extern int SockStatus(SOCKET hSock, int request, int *results );
|
extern int SockStatus(SOCKET hSock, int request, int *results );
|
||||||
extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
|
extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ uint64_t mg_millis(void) {
|
|||||||
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
||||||
#elif MG_ARCH == MG_ARCH_AZURERTOS
|
#elif MG_ARCH == MG_ARCH_AZURERTOS
|
||||||
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
|
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
|
||||||
|
#elif MG_ARCH == MG_ARCH_TIRTOS
|
||||||
|
return (uint64_t) Clock_getTicks();
|
||||||
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
||||||
return (uint64_t) k_uptime_get();
|
return (uint64_t) k_uptime_get();
|
||||||
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
||||||
|
|||||||
Reference in new issue
Block a user