您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ sysClkRateGet函数代码示例

51自学网 2021-06-03 08:36:50
  C++
这篇教程C++ sysClkRateGet函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中sysClkRateGet函数的典型用法代码示例。如果您正苦于以下问题:C++ sysClkRateGet函数的具体用法?C++ sysClkRateGet怎么用?C++ sysClkRateGet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了sysClkRateGet函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: osl_cachereclaim

/* Free some buffers every 1 second */static voidosl_cachereclaim(void * data){	osl_t *osh = (osl_t *)data;	uint ticks = TAGCACHE_RECLAIM_TIME / (1000/ sysClkRateGet());	if (TAGCACHE_RECLAIM_TIME % (1000 / sysClkRateGet()))		ticks++;	TAGCACHE_LOCK(osh);	bcmcache_reclaim(osh->pkttag_memp);	TAGCACHE_UNLOCK(osh);	wdStart(osh->cache_wd, ticks, (FUNCPTR) osl_cachereclaim_timer, (int) osh);}
开发者ID:ariavie,项目名称:bcm,代码行数:15,


示例2: resetNameBufs

/*----------------------------------------------------------------------*/staticvoid resetNameBufs()   /* free all named buffers */{   int retrys;   int callTaskId,DwnLkrTaskId;   int callTaskPrior;   /* Since reset2SafeState should have left the downLinker in a ready      state we now longer need change priority/etc. here to get it to clean      up.     8/6/97   */   retrys=0;   /* start wdog timeout of 7 seconds */ #ifdef INOVA   pHandlerTimeout = 0;   wdStart(pHandlerWdTimeout,sysClkRateGet() * 7, pHandlerWdISR, 0);   /* free buffers until all are free or watch-dog timeout has occurred */   while ( ((dlbUsedBufs(pDlbDynBufs) > 0) || (dlbUsedBufs(pDlbFixBufs) > 0)) &&		(!pHandlerTimeout) )   {        retrys++;   	DPRINT(0,"dlbFreeAll Dyn");   	dlbFreeAll(pDlbDynBufs);   	DPRINT(0,"dlbFreeAll Fix");   	dlbFreeAll(pDlbFixBufs);	Tdelay(1);	DPRINT1(0,"resetNameBufs: retrys: %d/n",retrys);   }   wdCancel(pHandlerWdTimeout);#endif}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:35,


示例3: OS_ShellOutputToFile

/* --------------------------------------------------------------------------------------Name: OS_ShellOutputToFilePurpose: Takes a shell command in and writes the output of that command to the specified fileReturns: OS_SUCCESS if success         OS_FS_ERR_INVALID_FD if the file descriptor passed in is invalid         OS_FS_ERROR if Error---------------------------------------------------------------------------------------*/int32 OS_ShellOutputToFile(char* Cmd, int32 OS_fd){    char LocalCmd [OS_MAX_CMD_LEN];    int32 Result;    int32 ReturnCode = OS_FS_SUCCESS;    int32 fdCmd;    char * shellName;    /*    ** Check parameters    */    if (Cmd == NULL)    {        return(OS_FS_ERR_INVALID_POINTER);    }    /* Make sure the file descriptor is legit before using it */    if (OS_fd < 0 || OS_fd >= OS_MAX_NUM_OPEN_FILES || OS_FDTable[OS_fd].IsValid == FALSE)    {        ReturnCode = OS_FS_ERR_INVALID_FD;    }    else    {        /* Create a file to write the command to (or write over the old one) */        fdCmd = OS_creat(OS_SHELL_CMD_INPUT_FILE_NAME,OS_READ_WRITE);        if (fdCmd < OS_FS_SUCCESS)        {            Result = OS_FS_ERROR;        }        else        {            /* copy the command to the file, and then seek back to the beginning of the file */            strncpy(LocalCmd,Cmd, OS_MAX_CMD_LEN);            OS_write(fdCmd,Cmd, strlen(LocalCmd));            OS_lseek(fdCmd,0,OS_SEEK_SET);            /* Create a shell task the will run the command in the file, push output to OS_fd */            Result = shellGenericInit("INTERPRETER=Cmd",0,NULL, &shellName, FALSE, FALSE, OS_FDTable[fdCmd].OSfd,	OS_FDTable[OS_fd].OSfd, OS_FDTable[OS_fd].OSfd);            /* Wait for the command to terminate */           do{              taskDelay(sysClkRateGet());            }while (taskNameToId(shellName) != ERROR);            /* Close the file descriptor */            OS_close(fdCmd);        } /* else */        if (Result != OK)        {             ReturnCode =  OS_FS_ERROR;        }    }    return ReturnCode;}/* end OS_ShellOutputToFile */
开发者ID:TomCrowley-ME,项目名称:me_sim_test,代码行数:69,


示例4: taskDelay

void periodHost    (    int		secs,		/* no. of seconds to delay between calls */    FUNCPTR	func,		/* function to call repeatedly */    int		arg1,		/* first of eight args to pass to func */    int		arg2,		    int		arg3,	    int		arg4,    int		arg5,    int		arg6,    int		arg7,    int		arg8    )    {#if ((CPU_FAMILY == ARM) && ARM_THUMB)    func = (FUNCPTR)((UINT32)func | 1);#endif    FOREVER	{	(* func) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);	taskDelay (secs * sysClkRateGet ());	}    }
开发者ID:andy345,项目名称:vxworks5,代码行数:25,


示例5: dataGetState

/****************************************************************  dataGetState - Obtains the current DATA Status**  This routines Obtains the status of the DATA via 3 different modes.**   NO_WAIT - return the present value immediately.*   WAIT_FOREVER - waits till the STM Status has changed *			and and returns this new value.*   TIME_OUT - waits till the STM Status has changed or *		    the number of <secounds> has elasped *		    (timed out) before returning.**  NOTE: The Task that calls this routine with *	 STM_WAIT_FOREVER or STM_TIME_OUT will block !!*     *** RETURNS:* STM state - if no error, TIME_OUT - if in STM_TIME_OUT mode call timed out*	      or ERROR if called with invalid mode;**/ int dataGetState(DATAOBJ_ID pStmId, int mode, int secounds){   int state;   if (pStmId == NULL)     return(ERROR);   switch(mode)   {     case NO_WAIT:          state = pStmId->dataState;	  break;     case WAIT_FOREVER: /* block if state has not changed */	  semTake(pStmId->pSemStateChg, WAIT_FOREVER);            state = pStmId->dataState;	  break;     case TIME_OUT:     /* block if state has not changed, until timeout */          if ( semTake(pStmId->pSemStateChg, (sysClkRateGet() * secounds) ) != OK )	     state = TIME_OUT;          else              state = pStmId->dataState;          break;     default:	  state = ERROR;	  break;   }   return(state);}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:54,


示例6: sslOpenOsdep

/*	OS dependent Open. */int sslOpenOsdep(void){	tickspersec = sysClkRateGet();	psOpenMalloc(MAX_MEMORY_USAGE);	return 0;}
开发者ID:cmtsij,项目名称:Vizio_XWR100_GPL,代码行数:10,


示例7: adcGetState

int adcGetState(ADC_ID pAdcId, int mode, int secounds)/* ADC_ID pAdcId;   ADC Object *//* int mode;	    mode of call, see above *//* int secounds;    number of secounds to wait before timing out */{   int state;   if (pAdcId == NULL)     return(ERROR);   switch(mode)   {     case NO_WAIT:          state = pAdcId->adcState;	  break;     case WAIT_FOREVER: /* block if state has not changed */	      semTake(pAdcId->pSemAdcStateChg, WAIT_FOREVER);            state = pAdcId->adcState;	  break;     case TIME_OUT:     /* block if state has not changed, until timeout */          if ( semTake(pAdcId->pSemAdcStateChg, (sysClkRateGet() * secounds) ) != OK )	         state = TIME_OUT;          else              state = pAdcId->adcState;          break;     default:	  state = ERROR;	  break;   }   return(state);}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:32,


示例8: OS_BSPMain

void OS_BSPMain( void ){   int    TicksPerSecond;      /*   ** Initialize the OS API   */   OS_API_Init();   /*    ** Delay for one second.    */   TicksPerSecond = sysClkRateGet();   (void) taskDelay( TicksPerSecond );   OS_printf("Starting Up OSAPI App./n");      /*   ** Call OSAL entry point.       */   OS_Application_Startup();   /*   ** Exit the main thread.   ** in VxWorks we can delete all of the OS tasks if we want.   */}
开发者ID:iamjy,项目名称:osal,代码行数:28,


示例9: release_access

/* release semaphore when done  */intrelease_access (short int *sem, double timeout){  int tst;  ULONG timeout_ticks, start_ticks, current_ticks, elapsed_ticks;  timeout_ticks = (ULONG) (timeout * sysClkRateGet ());  start_ticks = tickGet ();  elapsed_ticks = 0;  while (elapsed_ticks <= timeout_ticks)    {      tst = decrement_read_status (sem);      if (tst == 0)	{	  taskUnlock ();	  return 0;		/* success */	}      else	{	  if (tst < 0)	    {	      taskUnlock ();	      rcs_print_error ("invalid semaphore on 0x%x", (int) sem);	      return -1;	/* invalid semaphore  */	    }	}      current_ticks = tickGet ();      elapsed_ticks = current_ticks - start_ticks;    }  taskUnlock ();  rcs_print_error ("timed out while releasing access on semphore 0x%x",		   (int) sem);  return -1;			/* timeout failure */}
开发者ID:dadongdong,项目名称:rcslib,代码行数:36,


示例10: vxSpawn

/* * Main: start the diagnostics and CLI shell under vxWorks. */voidvxSpawn(void){    extern void diag_shell(void *);#ifdef WIND_DEBUG    IMPORT taskDelay(int ticks);    printf("Waiting for CrossWind attach .../n");    taskDelay(sysClkRateGet()*60);#endif    sal_core_init();    sal_appl_init();#ifdef BCM_BPROF_STATS    shr_bprof_stats_time_init();#endif#ifdef DEBUG_STARTUP    debugk_select(DEBUG_STARTUP);#endif    printk ("SOC BIOS (VxWorks) %s v%s./n", sysModel(), vxWorksVersion);    printk ("Kernel: %s./n", kernelVersion());    printk ("Made on %s./n", creationDate);    sal_thread_create("bcmCLI", 128*1024,100, diag_shell, 0);    sal_thread_create("bcmLED", 8192, 99, led_beat, 0);}
开发者ID:ariavie,项目名称:bcm,代码行数:30,


示例11: __mg_os_time_delay

void __mg_os_time_delay (int ms){#ifndef __NOUNIX__    /* use select instead of usleep */    struct timeval timeout;    timeout.tv_sec=0;    timeout.tv_usec=ms*1000;    while (select (0, NULL, NULL, NULL, &timeout) < 0);#elif defined (__UCOSII__)    OSTimeDly (OS_TICKS_PER_SEC * ms / 1000);#elif defined (__VXWORKS__)     taskDelay (sysClkRateGet() * ms / 1000);#elif defined (__PSOS__) || defined (__ECOS__)    struct timespec ts;    ts.tv_sec = 0;    ts.tv_nsec = ms * 1000000;    nanosleep (&ts, NULL);#elif defined (WIN32)    void __stdcall Sleep (DWORD dwMilliSeconds);    Sleep (ms);#elif defined (__THREADX__)    tx_thread_sleep (ms/10);#elif defined (__NUCLEUS__)    NU_Sleep (ms/10);#elif defined (__OSE__)    delay(ms);#endif}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:28,


示例12: cpuBurnLoad50

/* Test routine, increase avg. cpu load by exactly 50% */int cpuBurnLoad50(int seconds){    test_wd = wdCreate();    if (!test_wd) {        printf("Error: cannot create watchdog timer/n");        return -1;    }    test_sem = semBCreate(SEM_Q_FIFO, SEM_EMPTY);    if (!test_sem) {        printf("Error: cannot create semaphore/n");        wdDelete(test_wd);        return -1;    }    test_ticks = seconds*sysClkRateGet();    test_burn = FALSE;    wdStart(test_wd, 1, testTick, 0);    while (test_ticks) {        /* sleep for one tick */        semTake(test_sem, WAIT_FOREVER);        /* burn cpu for one tick */        while (test_burn) {            test_counter++;        }    }    semDelete(test_sem);    wdDelete(test_wd);    return 0;}
开发者ID:MarkRivers,项目名称:iocStats,代码行数:32,


示例13: mailbox_scene_delay

/*lint -save -e685 -e568*/MAILBOX_EXTERN int mailbox_scene_delay(unsigned int scene_id,  int *try_times){    unsigned int go_on = MAILBOX_FALSE;    unsigned int delay_ms = 0;    unsigned int ticks = 0;    switch (scene_id) {        case MAILBOX_DELAY_SCENE_MSG_FULL:        case MAILBOX_DELAY_SCENE_IFC_FULL:            delay_ms = MAILBOX_VXWORKS_SEND_FULL_DELAY_MS;            /* coverity[unsigned_compare] */            go_on = (*try_times >= MAILBOX_VXWORKS_SEND_FULL_DELAY_TIMES) ?                     MAILBOX_FALSE : MAILBOX_TRUE;            break;        default:            break;    }    if (MAILBOX_TRUE == go_on) {        ticks = (delay_ms * sysClkRateGet()) / MAILBOX_MILLISEC_PER_SECOND; /*lint !e737*/        ticks++;    #ifndef _DRV_LLT_ /*taskDelay()影响UT覆盖率和测试效率*/        (void)taskDelay((int)ticks);    #endif    }    *try_times = *try_times + 1;    return (int)go_on;}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:31,


示例14: getOmtShimStatus

int getOmtShimStatus(){    int rtn = 0;    char *buf;    int i;    taskDelay(sysClkRateGet() / 10); /* Wait 100ms for any msgs to finish */    clearport(shimPort);	/* Empty the serial FIFO */    putstring(shimPort,"/rSTS/r"); /* Ask for status */    buf = getOmtSerialShimMsg(OMT_STATUS_MSG); /* Read status */    if (!buf){	errLogRet(LOGIT,debugInfo,"getOmtShimStatus: No status returned/n");	rtn = -1;    }else{	for (rtn=i=0; i<(8*sizeof(int)); i++, buf++){	    if (*buf == '+'){		rtn |= 1 << i;	    }else if (*buf == '/0'){		break;	    }else if (*buf != '.'){		errLogRet(LOGIT,debugInfo,			  "getOmtShimStatus: Non-status message received/n");		break;	    }	}    }    return rtn;}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:28,


示例15: taskDelay

void virtualStackTestDummy    (    vsNum    )    {    numTestTasks++;        taskDelay (vsNum * sysClkRateGet());    printf ("Attempting to set myself to Stack %d/n", vsNum);        if (virtualStackNumTaskIdSet(vsNum) == ERROR)        {        printf ("Task for stack %d failed./n", vsNum);        return;        }    printf ("Task %d has myStackNum of %d/n", vsNum, myStackNum);    printf ("Task %d has stack info of.../n", vsNum);    virtualStackInfo (vsTbl[myStackNum]);    numTestTasks--;        if (numTestTasks == 0)        semGive(virtualStackTestSem);    }
开发者ID:andy345,项目名称:vxworks5,代码行数:30,


示例16: timeru_delInstance

//------------------------------------------------------------------------------tOplkError timeru_delInstance(void){    ULONG               msg;    tTimeruData*        pTimer;    /* send message to timer task to signal shutdown */    msg = 0;    msgQSend(timeruInstance_l.msgQueue, (char*)&msg, sizeof(ULONG),             NO_WAIT, MSG_PRI_NORMAL);    /* wait for timer task to end */    while (taskIdVerify(timeruInstance_l.taskId) == OK)        taskDelay(sysClkRateGet());    /* free up timer list */    resetTimerList();    while ((pTimer = getNextTimer()) != NULL)    {        hrtimer_delete (pTimer->timer);        removeTimer(pTimer);        OPLK_FREE(pTimer);    }    /* cleanup resources */    semDelete(timeruInstance_l.mutex);    msgQDelete(timeruInstance_l.msgQueue);    timeruInstance_l.pFirstTimer = NULL;    timeruInstance_l.pLastTimer = NULL;    return kErrorOk;}
开发者ID:Openwide-Ingenierie,项目名称:openpowerlink-rtnet,代码行数:33,


示例17: while

bool ControleurDAxe::procedureDInitialisation(){	float pressionMuscle1 = _pActionneur->pressionMuscle1();	float pressionMuscle2 = _pActionneur->pressionMuscle2();	float pressionDeBase  = _pActionneur->pressionDeBase();		//printf("Pression axe : %f %f /n", pressionMuscle1, pressionMuscle2);	while (pressionMuscle1 < (pressionDeBase + _commandeRepos)|| pressionMuscle2 < (pressionDeBase - _commandeRepos))  {    if (pressionMuscle1<(pressionDeBase + _commandeRepos))			pressionMuscle1 += 0.05;    else    	pressionMuscle1 = pressionDeBase + _commandeRepos;		if (pressionMuscle2<(pressionDeBase - _commandeRepos))			pressionMuscle2 += 0.05;    else pressionMuscle2 = pressionDeBase - _commandeRepos;    _pActionneur->envoyerCommandeDecouplee(pressionMuscle1,pressionMuscle2);			    taskDelay(sysClkRateGet()/10);  }  _deltaCommande = _commandeRepos;  //printf("Commande precedente : %f/n", _deltaCommande);    return true;}
开发者ID:gkharish,项目名称:Pneumatic_7D_manipulator,代码行数:27,


示例18: sysTffsInit

LOCAL void sysTffsInit (void)    {    UINT32 ix = 0;    UINT32 iy = 1;    UINT32 iz = 2;    int oldTick;    /* we assume followings:     *   - no interrupts except timer is happening.     *   - the loop count that consumes 1 msec is in 32 bit.     * it is done in the early stage of usrRoot() in tffsDrv().  */    oldTick = tickGet();    while (oldTick == tickGet())	/* wait for next clock interrupt */	;    oldTick = tickGet();    while (oldTick == tickGet())	/* loop one clock tick */	{	iy = KILL_TIME_FUNC;		/* consume time */	ix++;				/* increment the counter */	}    sysTffsMsecLoopCount = ix * sysClkRateGet() / 1000;    /* TODO:     * Call each sockets register routine here     */    rfaRegister ();	/* RFA socket interface register */    }
开发者ID:Reedgarden,项目名称:bcm-sdk-xgs,代码行数:31,


示例19: error

LOCAL void timexScale    (    int ticks,          /* total ticks required for all reps */    int reps,           /* number of reps performed */    FAST int *pScale,   /* ptr where to return scale:                         *   0 = secs, 1 = millisecs, 2 = microsecs */    FAST int *pTime,    /* ptr where to return time per rep in above units */    int *pError,        /* ptr where to return error margin in above units */    int *pPercent       /* ptr where to return percent error (0..100) */    )    {    FAST int scalePerSec;    /* calculate time per rep in best scale */    *pScale = 0;		/* start with "seconds" scale */    scalePerSec = 1;    *pTime = ticks * scalePerSec / sysClkRateGet () / reps;    while ((*pScale < 2) && (*pTime < 100))	{	(*pScale)++;	scalePerSec = scalePerSec * 1000;	*pTime = ticks * scalePerSec / sysClkRateGet () / reps;	}    /* adjust for overhead if in microseconds scale */    if (*pScale == 2)	{	*pTime -= overhead;	if (*pTime < 0)	    *pTime = 0;	}    /* calculate error */    *pError = scalePerSec / sysClkRateGet () / reps;    if (*pTime == 0)	*pPercent = 100;    else	*pPercent = 100 * *pError / *pTime;    }
开发者ID:andy345,项目名称:vxworks5,代码行数:47,


示例20: tm_Time_F

static double tm_Time_F(int s)	{	static double ret;#ifdef TIMES	static struct tms tstart,tend;	if(s == START) {		//times(&tstart); shilps		return(0);	} else {		//times(&tend); shilpa		ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;		return((ret == 0.0)?1e-6:ret);	}#elif defined(OPENSSL_SYS_NETWARE)    static clock_t tstart,tend;    if (s == START)    {        tstart=clock();        return(0);    }    else    {        tend=clock();        ret=(double)((double)(tend)-(double)(tstart));        return((ret < 0.001)?0.001:ret);    }#elif defined(OPENSSL_SYS_VXWORKS)        {	static unsigned long tick_start, tick_end;	if( s == START )		{		tick_start = tickGet();		return 0;		}	else		{		tick_end = tickGet();		ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();		return((ret == 0.0)?1e-6:ret);		}        }#else /* !times() */	static struct timeb tstart,tend;	long i;	if(s == START) {		ftime(&tstart);		return(0);	} else {		ftime(&tend);		i=(long)tend.millitm-(long)tstart.millitm;		ret=((double)(tend.time-tstart.time))+((double)i)/1000.0;		return((ret == 0.0)?1e-6:ret);	}#endif}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:59,


示例21: sysAuxClkInit

void sysAuxClkInit(void){	if((auxDog = wdCreate()) == NULL){		logMsg("watchDog create failed!/n", 0, 0, 0, 0, 0, 0);		return;	}	sysAuxClkTicksPerSecond = sysClkRateGet();}
开发者ID:smalltree,项目名称:shenglong,代码行数:8,


示例22: memset

STATUS control::exit() const{	CAN_PACKET sendPack,recvPack;	memset(&sendPack,0,CP_SIZE);	memset(&recvPack,0,CP_SIZE);	driverDisable(ERROR_ALL_NODE);	faultLEDControl(false,ERROR_ALL_NODE);	taskDelay(sysClkRateGet() / 2);	GV::isStopAll = TRUE;	taskDelay(sysClkRateGet() / 2);	can.release();	net.release();	digitalIO.release();	DISPLAY_FAULT("关机退出!");	file.writeLogFile("关机退出!");	return OK;}
开发者ID:wycstar,项目名称:JL3,代码行数:17,


示例23: getSysClkRate

/* * ===================================================================== * Function:getSysClkRate() * Description: Get system clock Rate, times/second * Input:   N/A * Output:  N/A * Return:  clock rate(perSecond) on SUCCESS, -1 otherwise. *====================================================================== */int getSysClkRate(void){#ifdef LINUX_OS    return 100;#elif VXWORKS_OS    return sysClkRateGet();#endif}
开发者ID:github188,项目名称:foundationlib,代码行数:17,


示例24: initGL

UGL_LOCAL void initGL (GLsizei width, GLsizei height)    {    UGL_LOCAL GLfloat pos[4] = {5.0, 5.0, 10.0, 1.0 };    UGL_LOCAL GLfloat red[4] = {0.8, 0.1, 0.0, 1.0 };    UGL_LOCAL GLfloat green[4] = {0.0, 0.8, 0.2, 1.0 };    UGL_LOCAL GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0 };    glLightfv (GL_LIGHT0, GL_POSITION, pos);    glEnable (GL_CULL_FACE);    glEnable (GL_LIGHTING);    glEnable (GL_LIGHT0);    glEnable (GL_DEPTH_TEST);    /* make the gears */    gear1 = glGenLists (1);    glNewList (gear1, GL_COMPILE);    glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);    gear (1.0, 4.0, 1.0, 20, 0.7);    glEndList ();    gear2 = glGenLists (1);    glNewList (gear2, GL_COMPILE);    glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);    gear (0.5, 2.0, 2.0, 10, 0.7);    glEndList ();    gear3 = glGenLists (1);    glNewList (gear3, GL_COMPILE);    glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);    gear (1.3, 2.0, 0.5, 10, 0.7);    glEndList ();    glEnable (GL_NORMALIZE);    glViewport (0, 0, width, height);    glMatrixMode (GL_PROJECTION);    glLoadIdentity ();    if (width>height)        {	GLfloat w = (GLfloat) width / (GLfloat) height;	glFrustum (-w, w, -1.0, 1.0, 5.0, 60.0);        }    else        {	GLfloat h = (GLfloat) height / (GLfloat) width;	glFrustum (-1.0, 1.0, -h, h, 5.0, 60.0);        }    glMatrixMode (GL_MODELVIEW);    glLoadIdentity ();    glTranslatef (0.0, 0.0, -40.0);#ifdef COUNT_FRAMES    tickStart = tickGet ();    tickBySec = sysClkRateGet ();#endif}
开发者ID:MttDs,项目名称:new-rexeno-tindpe,代码行数:58,


示例25: waitImpl

bool EventImpl::waitImpl(long milliseconds){	if (!_state)	{		int ticks = milliseconds*sysClkRateGet()/1000;		return semTake(_sem, ticks) == OK;	}	else return true;}
开发者ID:cshnick,项目名称:CommunicationModel,代码行数:9,


示例26: sysClkRateGet

void bhs_MutexRobot::infiniteTimerTask() {	int lnTicksToWaitBetweenRobotCycles = sysClkRateGet() / 25;	semTake(m_startSem, WAIT_FOREVER);	while (true) {		semGive(m_periodSem);		taskDelay(lnTicksToWaitBetweenRobotCycles);	}}
开发者ID:LHambric1885,项目名称:frc1885-2014,代码行数:9,


示例27: osl_cachereclaim_timer_start

/* Start the 1 second timer */static boolosl_cachereclaim_timer_start(osl_t *osh){	uint ticks;	if ((osh->cache_lock = semBCreate(SEM_Q_FIFO, SEM_FULL)) == NULL)		return FALSE;	if ((osh->cache_wd = wdCreate()) == NULL)		return FALSE;	ticks = TAGCACHE_RECLAIM_TIME / (1000/ sysClkRateGet());	if (TAGCACHE_RECLAIM_TIME % (1000 / sysClkRateGet()))		ticks++;	if ((wdStart(osh->cache_wd, ticks, (FUNCPTR) osl_cachereclaim_timer, (int) osh)) != OK)		return FALSE;	return TRUE;}
开发者ID:ariavie,项目名称:bcm,代码行数:20,



注:本文中的sysClkRateGet函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ sysErrorBelch函数代码示例
C++ sys函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。