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

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

51自学网 2021-06-01 21:16:33
  C++
这篇教程C++ GetTimeInMillis函数代码示例写得很实用,希望能帮到您。

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

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

示例1: TimeSinceLastInputEvent

intTimeSinceLastInputEvent(void){    if (lastEventTime == 0)        lastEventTime = GetTimeInMillis();    return GetTimeInMillis() - lastEventTime;}
开发者ID:Agnesa,项目名称:xserver,代码行数:7,


示例2: MouseWaitForReadable

static BoolMouseWaitForReadable (int fd, int timeout){    fd_set	    set;    struct timeval  tv, *tp;    int		    n;    CARD32	    done;    done = GetTimeInMillis () + timeout;    for (;;)    {	FD_ZERO (&set);	FD_SET (fd, &set);	if (timeout == -1)	    tp = 0;	else	{	    tv.tv_sec = timeout / 1000;	    tv.tv_usec = (timeout % 1000) * 1000;	    tp = &tv;	}	n = select (fd + 1, &set, 0, 0, tp);	if (n > 0)	    return TRUE;	if (n < 0 && (errno == EAGAIN || errno == EINTR))	{	    timeout = (int) (done - GetTimeInMillis ());	    if (timeout > 0)		continue;	}	break;    }    return FALSE;}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:34,


示例3: recv_alive_msg

static voidrecv_alive_msg (unsigned length){    CARD8   SessionRunning;    CARD32  AliveSessionID;    if (state != XDM_AWAIT_ALIVE_RESPONSE)	return;    if (length != 5)	return;    if (XdmcpReadCARD8 (&buffer, &SessionRunning) &&	XdmcpReadCARD32 (&buffer, &AliveSessionID))    {    	if (SessionRunning && AliveSessionID == SessionID)    	{	    /* backoff dormancy period */	    state = XDM_RUN_SESSION;	    if ((GetTimeInMillis() - lastDeviceEventTime.milliseconds) >		keepaliveDormancy * 1000)	    {		keepaliveDormancy <<= 1;		if (keepaliveDormancy > XDM_MAX_DORMANCY)		    keepaliveDormancy = XDM_MAX_DORMANCY;	    }	    timeOutTime = GetTimeInMillis() + keepaliveDormancy * 1000;    	}	else    	{	    XdmcpDeadSession ("Alive respose indicates session dead");    	}    }}
开发者ID:marioaugustorama,项目名称:tropix-xwindow,代码行数:32,


示例4: MouseFlush

static intMouseFlush (Kbufio *b, char *buf, int size){    CARD32  now = GetTimeInMillis ();    CARD32  done = now + 100;    int	    c;    int	    n = 0;        while ((c = MouseReadByte (b, done - now)) != -1)    {	if (buf)	{	    if (n == size)	    {		memmove (buf, buf + 1, size - 1);		n--;	    }	    buf[n++] = c;	}	now = GetTimeInMillis ();	if ((INT32) (now - done) >= 0)	    break;    }    return n;}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:25,


示例5: TimeSinceLastInputEvent

/* * TimeSinceLastInputEvent -- *      Function used for screensaver purposes by the os module. Returns the *      time in milliseconds since there last was any input. */intTimeSinceLastInputEvent(void){  if (xf86Info.lastEventTime == 0) {    xf86Info.lastEventTime = GetTimeInMillis();  }  return GetTimeInMillis() - xf86Info.lastEventTime;}
开发者ID:4eremuxa,项目名称:xserver,代码行数:13,


示例6: AccessXKeyboardEvent

static voidAccessXKeyboardEvent(DeviceIntPtr	keybd,                     BYTE		type,                     BYTE		keyCode,                     Bool		isRepeat){    xEvent		xE;    xE.u.u.type = type;    xE.u.u.detail = keyCode;    xE.u.keyButtonPointer.time = GetTimeInMillis();#ifdef DEBUG    if (xkbDebugFlags&0x8) {        ErrorF("AXKE: Key %d %s/n",keyCode,(xE.u.u.type==KeyPress?"down":"up"));    }#endif    if (_XkbIsPressEvent(type))        XkbDDXKeyClick(keybd,keyCode,TRUE);    else if (isRepeat)        XkbLastRepeatEvent=	(pointer)&xE;    XkbProcessKeyboardEvent(&xE,keybd,1L);    XkbLastRepeatEvent= NULL;    return;} /* AccessXKeyboardEvent */
开发者ID:GrahamCobb,项目名称:maemo-xsisusb,代码行数:26,


示例7: rfbSetXCutText

voidrfbSetXCutText(char *str, int len){    int i = 0;    inSetXCutText = TRUE;    ChangeWindowProperty(WindowTable[0], XA_CUT_BUFFER0, XA_STRING,			 8, PropModeReplace, len,			 (pointer)str, TRUE);        while ((i < NumCurrentSelections) && 	   CurrentSelections[i].selection != XA_PRIMARY)	i++;    if (i < NumCurrentSelections) {	xEvent event;	if (CurrentSelections[i].client) {	    event.u.u.type = SelectionClear;	    event.u.selectionClear.time = GetTimeInMillis();	    event.u.selectionClear.window = CurrentSelections[i].window;	    event.u.selectionClear.atom = CurrentSelections[i].selection;	    (void) TryClientEvents (CurrentSelections[i].client, &event, 1,				NoEventMask, NoEventMask /* CantBeFiltered */,				NullGrab);	}	CurrentSelections[i].window = None;	CurrentSelections[i].pWin = NULL;	CurrentSelections[i].client = NullClient;    }    inSetXCutText = FALSE;}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:34,


示例8: SendKeepAliveEvent

voidSendKeepAliveEvent(ClientPtr client){    fsKeepAliveEvent ev;    ev.type = FS_Event;    ev.event_code = KeepAlive;    ev.sequenceNumber = client->sequence;    ev.length = SIZEOF(fsKeepAliveEvent) >> 2;    ev.timestamp = GetTimeInMillis();#ifdef DEBUG    fprintf(stderr, "client #%d is getting a KeepAlive/n", client->index);#endif    if (client->swapped) {	/* SErrorEvent requires two fsError pointers */	fsError evTo;		SErrorEvent((fsError *) & ev, (fsError *) &evTo);	(void) WriteToClient(client, SIZEOF(fsKeepAliveEvent), (char *) &evTo);    } else {	(void) WriteToClient(client, SIZEOF(fsKeepAliveEvent), (char *) &ev);    }}
开发者ID:shanelle794,项目名称:theqvd,代码行数:25,


示例9: TimerCheck

void TimerCheck(void){	unsigned int now = GetTimeInMillis();	while (timers && (int)(timers->expires - now) <= 0)		DoTimer(timers, now, &timers);}
开发者ID:tenmachow,项目名称:laser-emu,代码行数:7,


示例10: AnimCurDisplayCursor

static BoolAnimCurDisplayCursor (ScreenPtr pScreen,		      CursorPtr pCursor){    AnimCurScreenPtr    as = GetAnimCurScreen(pScreen);    Bool		ret;    Unwrap (as, pScreen, DisplayCursor);    if (IsAnimCur(pCursor))    {	if (pCursor != animCurState.pCursor)	{	    AnimCurPtr		ac = GetAnimCur(pCursor);	    ret = (*pScreen->DisplayCursor) (pScreen, ac->elts[0].pCursor);	    if (ret)	    {		animCurState.elt = 0;		animCurState.time = GetTimeInMillis () + ac->elts[0].delay;		animCurState.pCursor = pCursor;		animCurState.pScreen = pScreen;	    }	}	else	    ret = TRUE;    }    else    {        animCurState.pCursor = 0;	animCurState.pScreen = 0;	ret = (*pScreen->DisplayCursor) (pScreen, pCursor);    }    Wrap (as, pScreen, DisplayCursor, AnimCurDisplayCursor);    return ret;}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:35,


示例11: send_packet

static voidsend_packet(void){    int rtx;    switch (state) {    case XDM_QUERY:    case XDM_BROADCAST:    case XDM_INDIRECT:#if defined(IPv6)  && defined(AF_INET6)    case XDM_MULTICAST:#endif        send_query_msg();        break;    case XDM_START_CONNECTION:        send_request_msg();        break;    case XDM_MANAGE:        send_manage_msg();        break;    case XDM_KEEPALIVE:        send_keepalive_msg();        break;    default:        break;    }    rtx = (XDM_MIN_RTX << timeOutRtx);    if (rtx > XDM_MAX_RTX)        rtx = XDM_MAX_RTX;    timeOutTime = GetTimeInMillis() + rtx * 1000;}
开发者ID:halfline,项目名称:xserver,代码行数:31,


示例12: wcmFingerTapToClick

static void wcmFingerTapToClick(WacomDevicePtr priv){	WacomCommonPtr common = priv->common;	WacomChannelPtr firstChannel = common->wcmChannel;	WacomChannelPtr secondChannel = common->wcmChannel + 1;	WacomDeviceState ds[2] = { firstChannel->valid.states[0],				   secondChannel->valid.states[0] };	WacomDeviceState dsLast[2] = { firstChannel->valid.states[1],					secondChannel->valid.states[1] };	DBG(10, priv, "/n");	/* process second finger tap if matched */	if ((ds[0].sample < ds[1].sample) &&	    ((GetTimeInMillis() -	    dsLast[1].sample) <= common->wcmGestureParameters.wcmTapTime) &&	    !ds[1].proximity && dsLast[1].proximity)	{		/* send left up before sending right down */		wcmSendButtonClick(priv, 1, 0);		common->wcmGestureMode = GESTURE_TAP_MODE;		/* right button down */		wcmSendButtonClick(priv, 3, 1);		/* right button up */		wcmSendButtonClick(priv, 3, 0);	}}
开发者ID:cbagwell,项目名称:xf86-input-wacom,代码行数:29,


示例13: do_butmap_change

static voiddo_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client){    int i;    xEvent core_mn;    deviceMappingNotify xi_mn;    /* The map in ButtonClassRec refers to button numbers, whereas the     * protocol is zero-indexed.  Sigh. */    memcpy(&(dev->button->map[1]), map, len);    core_mn.u.u.type = MappingNotify;    core_mn.u.mappingNotify.request = MappingPointer;    /* 0 is the server client. */    for (i = 1; i < currentMaxClients; i++) {        /* Don't send irrelevant events to na
C++ GetTimeMs函数代码示例
C++ GetTimeFormat函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。