forked from xuos/xiuos
merge codes
This commit is contained in:
@@ -95,6 +95,12 @@ int PrivTaskDelay(int32_t ms)
|
||||
return usleep(ms);
|
||||
}
|
||||
|
||||
uint32_t PrivGetTickTime(){
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
|
||||
}
|
||||
|
||||
/*********************fs**************************/
|
||||
|
||||
/************************Driver Posix Transform***********************/
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef TRANSFORM_H
|
||||
#define TRANSFORM_H
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/pthread.h>
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/time.h>
|
||||
@@ -187,6 +188,7 @@ int PrivTaskStartup(pthread_t *thread);
|
||||
int PrivTaskDelete(pthread_t thread, int sig);
|
||||
void PrivTaskQuit(void *value_ptr);
|
||||
int PrivTaskDelay(int32_t ms);
|
||||
uint32_t PrivGetTickTime();
|
||||
|
||||
/*********************driver*************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user