| /redis-3.2.3/src/ |
| H A D | util.c | 500 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 D | ae.c | 182 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 D | redis-benchmark.c | 106 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 D | anet.c | 185 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 D | intset.c | 307 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 D | server.c | 324 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 D | dict.c | 291 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 D | debug.c | 468 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 D | ziplist.c | 1114 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 D | replication.c | 274 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 D | redis-cli.c | 140 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 D | quicklist.c | 1466 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 D | hiredis.h | 176 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 D | net.c | 244 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 D | net.h | 43 int redisContextSetTimeout(redisContext *c, const struct timeval tv);
|
| H A D | test.c | 41 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 D | hiredis.c | 1035 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()
|