Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_time.c @ 0:4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
The first code that uses "ngx_" prefix, the previous one used "gx_" prefix.
At that point the code is not yet usable. The first draft ideas are dated
back to 23.10.2001.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 06 Aug 2002 16:39:45 +0000 |
parents | |
children | d220029ac7f3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4eff17414a43 |
---|---|
1 | |
2 #include <ngx_config.h> | |
3 #include <ngx_time.h> | |
4 | |
5 void ngx_localtime(ngx_tm_t *tm) | |
6 { | |
7 time_t clock = time(NULL); | |
8 localtime_r(&clock, tm); | |
9 } | |
10 | |
11 u_int ngx_msec(void) | |
12 { | |
13 struct timeval tv; | |
14 | |
15 gettimeofday(&tv, NULL); | |
16 | |
17 return tv.tv_sec * 1000 + tv.tv_usec / 1000; | |
18 } | |
19 |