Home
last modified time | relevance | path

Searched refs:tv (Results 1 – 17 of 17) sorted by relevance

/redis-3.2.3/src/
H A Dutil.c500 struct timeval tv; in getRandomHexChars() local
504 gettimeofday(&tv,NULL); in getRandomHexChars()
505 if (l >= sizeof(tv.tv_usec)) { in getRandomHexChars()
506 memcpy(x,&tv.tv_usec,sizeof(tv.tv_usec)); in getRandomHexChars()
507 l -= sizeof(tv.tv_usec); in getRandomHexChars()
508 x += sizeof(tv.tv_usec); in getRandomHexChars()
510 if (l >= sizeof(tv.tv_sec)) { in getRandomHexChars()
511 memcpy(x,&tv.tv_sec,sizeof(tv.tv_sec)); in getRandomHexChars()
512 l -= sizeof(tv.tv_sec); in getRandomHexChars()
513 x += sizeof(tv.tv_sec); in getRandomHexChars()
H A Dae.c182 struct timeval tv; in aeGetTime() local
184 gettimeofday(&tv, NULL); in aeGetTime()
185 *seconds = tv.tv_sec; in aeGetTime()
186 *milliseconds = tv.tv_usec/1000; in aeGetTime()
364 struct timeval tv, *tvp; in aeProcessEvents() local
372 tvp = &tv; in aeProcessEvents()
392 tv.tv_sec = tv.tv_usec = 0; in aeProcessEvents()
393 tvp = &tv; in aeProcessEvents()
H A Dredis-benchmark.c106 struct timeval tv; in ustime() local
109 gettimeofday(&tv, NULL); in ustime()
110 ust = ((long)tv.tv_sec)*1000000; in ustime()
111 ust += tv.tv_usec; in ustime()
116 struct timeval tv; in mstime() local
119 gettimeofday(&tv, NULL); in mstime()
120 mst = ((long long)tv.tv_sec)*1000; in mstime()
121 mst += tv.tv_usec/1000; in mstime()
H A Danet.c185 struct timeval tv; in anetSendTimeout() local
187 tv.tv_sec = ms/1000; in anetSendTimeout()
188 tv.tv_usec = (ms%1000)*1000; in anetSendTimeout()
189 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) { in anetSendTimeout()
H A Dintset.c307 struct timeval tv; in usec() local
308 gettimeofday(&tv,NULL); in usec()
309 return (((long long)tv.tv_sec)*1000000)+tv.tv_usec; in usec()
H A Dserver.c324 struct timeval tv; in serverLogRaw() local
328 gettimeofday(&tv,NULL); in serverLogRaw()
393 struct timeval tv; in ustime() local
396 gettimeofday(&tv, NULL); in ustime()
398 ust += tv.tv_usec; in ustime()
2700 struct timeval tv; in timeCommand() local
2704 gettimeofday(&tv,NULL); in timeCommand()
2706 addReplyBulkLongLong(c,tv.tv_sec); in timeCommand()
3933 struct timeval tv; in main() local
3970 gettimeofday(&tv,NULL); in main()
[all …]
H A Ddict.c291 struct timeval tv; in timeInMilliseconds() local
293 gettimeofday(&tv,NULL); in timeInMilliseconds()
294 return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000); in timeInMilliseconds()
H A Ddebug.c468 struct timespec tv; in debugCommand() local
470 tv.tv_sec = utime / 1000000; in debugCommand()
471 tv.tv_nsec = (utime % 1000000) * 1000; in debugCommand()
472 nanosleep(&tv, NULL); in debugCommand()
H A Dziplist.c1114 struct timeval tv; in usec() local
1115 gettimeofday(&tv,NULL); in usec()
1116 return (((long long)tv.tv_sec)*1000000)+tv.tv_usec; in usec()
H A Dreplication.c274 struct timeval tv; in replicationFeedMonitors() local
276 gettimeofday(&tv,NULL); in replicationFeedMonitors()
277 cmdrepr = sdscatprintf(cmdrepr,"%ld.%06ld ",(long)tv.tv_sec,(long)tv.tv_usec); in replicationFeedMonitors()
H A Dredis-cli.c140 struct timeval tv; in ustime() local
143 gettimeofday(&tv, NULL); in ustime()
144 ust = ((long long)tv.tv_sec)*1000000; in ustime()
145 ust += tv.tv_usec; in ustime()
H A Dquicklist.c1466 struct timeval tv; in ustime() local
1469 gettimeofday(&tv, NULL); in ustime()
1470 ust = ((long long)tv.tv_sec) * 1000000; in ustime()
1471 ust += tv.tv_usec; in ustime()
/redis-3.2.3/deps/hiredis/
H A Dhiredis.h176 redisContext *redisConnectWithTimeout(const char *ip, int port, const struct timeval tv);
180 redisContext *redisConnectUnixWithTimeout(const char *path, const struct timeval tv);
183 int redisSetTimeout(redisContext *c, const struct timeval tv);
H A Dnet.c244 int redisContextSetTimeout(redisContext *c, const struct timeval tv) { in redisContextSetTimeout() argument
245 if (setsockopt(c->fd,SOL_SOCKET,SO_RCVTIMEO,&tv,sizeof(tv)) == -1) { in redisContextSetTimeout()
249 if (setsockopt(c->fd,SOL_SOCKET,SO_SNDTIMEO,&tv,sizeof(tv)) == -1) { in redisContextSetTimeout()
H A Dnet.h43 int redisContextSetTimeout(redisContext *c, const struct timeval tv);
H A Dtest.c41 struct timeval tv; in usec() local
42 gettimeofday(&tv,NULL); in usec()
43 return (((long long)tv.tv_sec)*1000000)+tv.tv_usec; in usec()
468 struct timeval tv = { 0, 1000 }; in test_blocking_io_errors() local
469 assert(redisSetTimeout(c,tv) == REDIS_OK); in test_blocking_io_errors()
H A Dhiredis.c1035 redisContext *redisConnectWithTimeout(const char *ip, int port, const struct timeval tv) { in redisConnectWithTimeout() argument
1043 redisContextConnectTcp(c,ip,port,&tv); in redisConnectWithTimeout()
1079 redisContext *redisConnectUnixWithTimeout(const char *path, const struct timeval tv) { in redisConnectUnixWithTimeout() argument
1087 redisContextConnectUnix(c,path,&tv); in redisConnectUnixWithTimeout()
1116 int redisSetTimeout(redisContext *c, const struct timeval tv) { in redisSetTimeout() argument
1118 return redisContextSetTimeout(c,tv); in redisSetTimeout()