mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
plat unix 64 bit timestamps on 32-bit os
Signed-off-by: Imo Farcher <ifar@gmx.net>
This commit is contained in:
parent
49f72aa451
commit
97a748a2d0
2 changed files with 2 additions and 2 deletions
|
@ -721,7 +721,7 @@ LWS_VISIBLE void lwsl_emit_stderr(int level, const char *line)
|
|||
for (n = 0; n < LLL_COUNT; n++)
|
||||
if (level == (1 << n)) {
|
||||
now = time_in_microseconds() / 100;
|
||||
sprintf(buf, "[%lu:%04d] %s: ", (unsigned long) now / 10000,
|
||||
sprintf(buf, "[%llu:%04d] %s: ", (unsigned long long) now / 10000,
|
||||
(int)(now % 10000), log_level_names[n]);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ unsigned long long time_in_microseconds(void)
|
|||
{
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return (tv.tv_sec * 1000000) + tv.tv_usec;
|
||||
return ((unsigned long long)tv.tv_sec * 1000000LL) + tv.tv_usec;
|
||||
}
|
||||
|
||||
LWS_VISIBLE int libwebsockets_get_random(struct libwebsocket_context *context,
|
||||
|
|
Loading…
Add table
Reference in a new issue