UP
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <syncstream>
|
||||
#include "sim_test.h"
|
||||
|
||||
void Test_RunTime(char *name, void (*pFunction)(void *)) {
|
||||
void Test_RunTime(char *name, int (*pFunction)(void *)) {
|
||||
clock_t start, end;
|
||||
double cpu_time_used;
|
||||
|
||||
@@ -24,11 +24,7 @@ void Test_RunTime(char *name, void (*pFunction)(void *)) {
|
||||
printf("\nTime taken by %s: %f seconds\n", name, cpu_time_used);
|
||||
}
|
||||
|
||||
void Test_Run(char *name, void (*pFunction)(void *)) {
|
||||
|
||||
|
||||
SDL_Thread *Test_Run(char *name, int (*pFunction)(void *), void *arg) {
|
||||
printf("\n------< %s TEST >------\n", name);
|
||||
_beginthread(pFunction, 0, NULL);
|
||||
|
||||
|
||||
return ThreadCreat(pFunction, name, arg);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "sim_thread.h"
|
||||
/**
|
||||
* @brief 测试函数执行时间
|
||||
* @param name: [输入] 测试名称
|
||||
@@ -15,9 +15,9 @@ extern "C" {
|
||||
* @return void
|
||||
* @example Test("FunctionName", functionName);
|
||||
**/
|
||||
void Test_RunTime(char *name, void (*pFunction)(void *));
|
||||
void Test_RunTime(char *name, int (*pFunction)(void *));
|
||||
|
||||
void Test_Run(char *name, void (*pFunction)(void *));
|
||||
SDL_Thread *Test_Run(char *name, int (*pFunction)(void *), void *arg);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user