mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-06 09:50:28 +00:00
Update redbean constants for consistency.
This commit is contained in:
parent
2638c95993
commit
8df9b6149d
1 changed files with 5 additions and 5 deletions
|
@ -1172,8 +1172,8 @@ static void AppendResourceReport(struct rusage *ru, const char *nl) {
|
||||||
if (ru->ru_maxrss) {
|
if (ru->ru_maxrss) {
|
||||||
Append("ballooned to %,ldkb in size%s", ru->ru_maxrss, nl);
|
Append("ballooned to %,ldkb in size%s", ru->ru_maxrss, nl);
|
||||||
}
|
}
|
||||||
if ((utime = ru->ru_utime.tv_sec * 1000000 + ru->ru_utime.tv_usec) |
|
if ((utime = ru->ru_utime.tv_sec * 1e6 + ru->ru_utime.tv_usec) |
|
||||||
(stime = ru->ru_stime.tv_sec * 1000000 + ru->ru_stime.tv_usec)) {
|
(stime = ru->ru_stime.tv_sec * 1e6 + ru->ru_stime.tv_usec)) {
|
||||||
ticks = ceill((long double)(utime + stime) / (1000000.L / CLK_TCK));
|
ticks = ceill((long double)(utime + stime) / (1000000.L / CLK_TCK));
|
||||||
Append("needed %,ldµs cpu (%d%% kernel)%s", utime + stime,
|
Append("needed %,ldµs cpu (%d%% kernel)%s", utime + stime,
|
||||||
(int)((long double)stime / (utime + stime) * 100), nl);
|
(int)((long double)stime / (utime + stime) * 100), nl);
|
||||||
|
@ -1223,8 +1223,8 @@ static void AppendResourceReport(struct rusage *ru, const char *nl) {
|
||||||
static void AddTimeval(struct timeval *x, const struct timeval *y) {
|
static void AddTimeval(struct timeval *x, const struct timeval *y) {
|
||||||
x->tv_sec += y->tv_sec;
|
x->tv_sec += y->tv_sec;
|
||||||
x->tv_usec += y->tv_usec;
|
x->tv_usec += y->tv_usec;
|
||||||
if (x->tv_usec >= 1000000) {
|
if (x->tv_usec >= 1e6) {
|
||||||
x->tv_usec -= 1000000;
|
x->tv_usec -= 1e6;
|
||||||
x->tv_sec += 1;
|
x->tv_sec += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4886,7 +4886,7 @@ static int LuaLog(lua_State *L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int LuaSleep(lua_State *L) {
|
static int LuaSleep(lua_State *L) {
|
||||||
usleep(1000000 * luaL_checknumber(L, 1));
|
usleep(1e6 * luaL_checknumber(L, 1));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue